XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
XoopsModelRead Class Reference
Inheritance diagram for XoopsModelRead:
Inheritance graph

Public Member Functions

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

Additional Inherited Members

- Public Attributes inherited from XoopsModelAbstract
 $handler
 

Detailed Description

Object render handler class.

Author
Taiwen Jiang phppp.nosp@m.@use.nosp@m.rs.so.nosp@m.urce.nosp@m.forge.nosp@m..net

XoopsObjectAbstract

Definition at line 30 of file read.php.

Member Function Documentation

XoopsModelRead::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

Definition at line 214 of file read.php.

References $GLOBALS, $i, $result, $ret, and $vars.

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

get all objects matching a condition

Parameters
object$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 41 of file read.php.

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

& XoopsModelRead::getByLimit (   $limit = 0,
  $start = 0,
  $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
object$criteriaCriteriaElement to match
array$fieldsvariables to fetch
bool$asObjectflag indicating as object, otherwise as array
Returns
array of objects XoopsObject

Definition at line 191 of file read.php.

References $criteria, $fields, $GLOBALS, $limit, $ret, and $start.

& XoopsModelRead::getIds (   $criteria = null)

get IDs of objects matching a condition

Parameters
object$criteriaCriteriaElement to match
Returns
array of object IDs

Definition at line 160 of file read.php.

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

XoopsModelRead::getList (   $criteria = null,
  $limit = 0,
  $start = 0 
)

Retrieve a list of objects data

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

Definition at line 121 of file read.php.

References $criteria, $limit, $myts, $result, $ret, $sql, $start, and MyTextSanitizer\getInstance().

Here is the call graph for this function:

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

retrieve objects from the database

For performance consideration, getAll() is recommended

Parameters
object$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 107 of file read.php.

References $criteria.


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