XOOPS  2.6.0
Xoops\Core\Kernel\Model\Read Class Reference
Inheritance diagram for Xoops\Core\Kernel\Model\Read:
Inheritance graph

Public Member Functions

 getAll (CriteriaElement $criteria=null, $fields=null, $asObject=true, $id_as_key=true)
 
 getIds (CriteriaElement $criteria=null)
 
 getList (CriteriaElement $criteria=null, $limit=0, $start=0)
 
 getObjects (CriteriaElement $criteria=null, $id_as_key=false, $as_object=true)
 
- Public Member Functions inherited from Xoops\Core\Kernel\XoopsModelAbstract
 setHandler (XoopsPersistableObjectHandler $handler)
 
 setVars ($args)
 

Additional Inherited Members

- Protected Attributes inherited from Xoops\Core\Kernel\XoopsModelAbstract
 $handler
 

Detailed Description

Definition at line 28 of file Read.php.

Member Function Documentation

Xoops\Core\Kernel\Model\Read::getAll ( CriteriaElement  $criteria = null,
  $fields = null,
  $asObject = true,
  $id_as_key = true 
)

get all objects matching a condition

Parameters
CriteriaElement | null$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

Definition at line 40 of file Read.php.

References $criteria, and $result.

Referenced by Xoops\Core\Kernel\Model\Read\getObjects().

Here is the caller graph for this function:

Xoops\Core\Kernel\Model\Read::getIds ( CriteriaElement  $criteria = null)

get IDs of objects matching a condition

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

Definition at line 162 of file Read.php.

References $criteria, $limit, $result, $sql, and $start.

Xoops\Core\Kernel\Model\Read::getList ( CriteriaElement  $criteria = null,
  $limit = 0,
  $start = 0 
)

Retrieve a list of objects data

Parameters
CriteriaElement | null$criteriaCriteriaElement conditions to be met
int$limitMax number of objects to fetch
int$startWhich record to start at
Returns
array

Definition at line 124 of file Read.php.

References $criteria, $myts, $result, and MyTextSanitizer\getInstance().

Here is the call graph for this function:

Xoops\Core\Kernel\Model\Read::getObjects ( CriteriaElement  $criteria = null,
  $id_as_key = false,
  $as_object = true 
)

retrieve objects from the database

For performance consideration, getAll() is recommended

Parameters
CriteriaElement | null$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

Definition at line 109 of file Read.php.

References $criteria, and Xoops\Core\Kernel\Model\Read\getAll().

Here is the call graph for this function:


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