Overview

Namespaces

  • None
  • Xmf
    • Database
    • Module
      • Helper
    • Template
  • Xoops
    • Auth
    • Core
      • Cache
      • Database
        • Logging
        • Schema
      • Exception
      • Handler
        • Scheme
      • Kernel
        • Dtype
        • Handlers
        • Model
      • Lists
      • Locale
        • Punic
      • Service
        • Contract
      • Session
      • Text
        • Sanitizer
          • Extensions
      • Theme
        • Plugins
    • Form
    • Html
    • Locale
    • Module
      • Helper
      • Plugin

Classes

  • Joint
  • Read
  • Stats
  • Sync
  • Write
  • Overview
  • Namespace
  • Class
  • Tree

Class Read

Object render handler class.

Xoops\Core\Kernel\XoopsModelAbstract
Extended by Xoops\Core\Kernel\Model\Read
Namespace: Xoops\Core\Kernel\Model
Package: Xoops\Core\Kernel
Category: Xoops\Core\Kernel\Model\Read
Copyright: 2000-2015 XOOPS Project (http://xoops.org)
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: Taiwen Jiang phppp@users.sourceforge.net
Since: 2.3.0
Link: http://xoops.org
Located at oops_lib/Xoops/Core/Kernel/Model/Read.php
Methods summary
public array
# getAll( Xoops\Core\Kernel\CriteriaElement $criteria = null, array $fields = null, boolean $asObject = true, boolean $id_as_key = true )

get all objects matching a condition

get all objects matching a condition

Parameters

$criteria
criteria to match
$fields
variables to fetch
$asObject
flag indicating as object, otherwise as array
$id_as_key
use the ID as key for the array

Returns

array
of objects/array as specified in $asObject
public array
# getObjects( Xoops\Core\Kernel\CriteriaElement $criteria = null, boolean $id_as_key = false, boolean $as_object = true )

retrieve objects from the database

retrieve objects from the database

For performance consideration, getAll() is recommended

Parameters

$criteria
criteria to match
$id_as_key
use the ID as key for the array
$as_object
return an array of objects?

Returns

array
public array
# getList( Xoops\Core\Kernel\CriteriaElement $criteria = null, integer $limit = 0, integer $start = 0 )

Retrieve a list of objects data

Retrieve a list of objects data

Parameters

$criteria
criteria to match
$limit
Max number of objects to fetch
$start
Which record to start at

Returns

array
public array
# getIds( Xoops\Core\Kernel\CriteriaElement $criteria = null )

get IDs of objects matching a condition

get IDs of objects matching a condition

Parameters

$criteria
criteria to match

Returns

array
of object IDs
public Xoops\Core\Kernel\XoopsObject|null
# getRandomObject( Xoops\Core\Kernel\CriteriaElement $criteria = null )

getRandomObject - return a randomly selected object

getRandomObject - return a randomly selected object

Parameters

$criteria
criteria to match

Returns

Xoops\Core\Kernel\XoopsObject|null
object or null if no matching object found
Methods inherited from Xoops\Core\Kernel\XoopsModelAbstract
setHandler(), setVars()
Properties inherited from Xoops\Core\Kernel\XoopsModelAbstract
$handler
API documentation generated by ApiGen