API - XOOPS 2.5.11 Beta 2
By monxoops.fr
XoopsModelRead Class Reference
Inheritance diagram for XoopsModelRead:
Collaboration diagram for XoopsModelRead:

Public Member Functions

getAll (CriteriaElement $criteria=null, $fields=null, $asObject=true, $id_as_key=true)
 
getObjects (CriteriaElement $criteria=null, $id_as_key=false, $as_object=true)
 
 getList (CriteriaElement $criteria=null, $limit=0, $start=0)
 
getIds (CriteriaElement $criteria=null)
 
getByLimit ($limit=0, $start=0, CriteriaElement $criteria=null, $fields=null, $asObject=true)
 
 convertResultSet ($result, $id_as_key=false, $as_object=true)
 
- Public Member Functions inherited from XoopsModelAbstract
 __construct ($args=null, $handler=null)
 
 setHandler ($handler)
 
 setVars ($args)
 

Additional Inherited Members

- Data Fields inherited from XoopsModelAbstract
 $handler
 

Detailed Description

Member Function Documentation

◆ convertResultSet()

convertResultSet (   $result,
  $id_as_key = false,
  $as_object = true 
)

Convert a database resultset to a returnable array

Parameters
object$resultdatabase resultset
bool$id_as_key- should NOT be used with joint keys
bool$as_object
Returns
array

◆ getAll()

& getAll ( CriteriaElement  $criteria = null,
  $fields = null,
  $asObject = true,
  $id_as_key = true 
)

get all objects matching a condition

Parameters
CriteriaElement | CriteriaCompo$criteriaCriteriaElement to match
array$fieldsvariables to fetch
bool$asObjectflag indicating as object, otherwise as array
bool$id_as_keyuse the ID as key for the array
Returns
array of objects/array XoopsObject
Here is the caller graph for this function:

◆ getByLimit()

& getByLimit (   $limit = 0,
  $start = 0,
CriteriaElement  $criteria = null,
  $fields = null,
  $asObject = true 
)

get a limited list of objects matching a condition

CriteriaCompo

Parameters
int$limitMax number of objects to fetch
int$startWhich record to start at
CriteriaElement$criteriaCriteriaElement to match
array$fieldsvariables to fetch
bool$asObjectflag indicating as object, otherwise as array
Returns
array of objects XoopsObject

◆ getIds()

& getIds ( CriteriaElement  $criteria = null)

get IDs of objects matching a condition

Parameters
CriteriaElement | CriteriaCompo$criteriaCriteriaElement to match
Returns
array of object IDs

◆ getList()

getList ( CriteriaElement  $criteria = null,
  $limit = 0,
  $start = 0 
)

Retrieve a list of objects data

Parameters
CriteriaElement$criteriaCriteriaElement conditions to be met
int$limitMax number of objects to fetch
int$startWhich record to start at
Returns
array
Here is the call graph for this function:

◆ getObjects()

& getObjects ( CriteriaElement  $criteria = null,
  $id_as_key = false,
  $as_object = true 
)

retrieve objects from the database

For performance consideration, getAll() is recommended

Parameters
CriteriaElement$criteriaCriteriaElement conditions to be met
bool$id_as_keyuse the ID as key for the array
bool$as_objectreturn an array of objects?
Returns
array
Here is the call graph for this function:

The documentation for this class was generated from the following file: