XOOPS 2.5.6
Final
|
Public Member Functions | |
__construct ($db=null, $table= '', $className= '', $keyName= '', $identifierName= '') | |
__call ($name, $args) | |
cleanOrphan ($table_link= '', $field_link= '', $field_object= '') | |
convertResultSet ($result, $id_as_key=false, $as_object=true) | |
& | create ($isNew=true) |
delete (&$object, $force=false) | |
deleteAll ($criteria=null, $force=true, $asObject=false) | |
deleteByLink ($criteria=null) | |
& | get ($id=null, $fields=null) |
& | getAll ($criteria=null, $fields=null, $asObject=true, $id_as_key=true) |
& | getByLimit ($limit=0, $start=0, $criteria=null, $fields=null, $asObject=true) |
& | getByLink ($criteria=null, $fields=null, $asObject=true, $field_link=null, $field_object=null) |
getCount ($criteria=null) | |
getCountByLink ($criteria=null) | |
getCounts ($criteria=null) | |
getCountsByLink ($criteria=null) | |
& | getIds ($criteria=null) |
getList ($criteria=null, $limit=0, $start=0) | |
& | getObjects ($criteria=null, $id_as_key=false, $as_object=true) |
insert (&$object, $force=true) | |
loadHandler ($name, $args=null) | |
setHandler ($handler=null, $args=null, $path=null) | |
synchronization () | |
updateAll ($fieldname, $fieldvalue, $criteria=null, $force=false) | |
updateByLink ($data, $criteria=null) | |
XoopsPersistableObjectHandler ($db=null, $table= '', $className= '', $keyName= '', $identifierName= '') | |
Public Member Functions inherited from XoopsObjectHandler | |
& | create () |
delete (&$object) | |
& | get ($int_id) |
insert (&$object) | |
XoopsObjectHandler (&$db) | |
Public Attributes | |
$className | |
$handler | |
$handlers = array('read' => null , 'stats' => null , 'joint' => null , 'write' => null , 'sync' => null) | |
$identifierName | |
$keyName | |
$table | |
Public Attributes inherited from XoopsObjectHandler | |
$db | |
Definition at line 1054 of file object.php.
XoopsPersistableObjectHandler::__construct | ( | $db = null , |
|
$table = '' , |
|||
$className = '' , |
|||
$keyName = '' , |
|||
$identifierName = '' |
|||
) |
*#@- Constructor
protected
object | $db | XoopsDatabase object |
string | $tablename | Name of database table |
string | $classname | Name of Class, this handler is managing |
string | $keyname | Name of the property, holding the key |
Definition at line 1108 of file object.php.
References $className, XoopsObjectHandler\$db, $identifierName, $keyName, $table, XoopsDatabaseFactory\getDatabaseConnection(), and XoopsObjectHandler\XoopsObjectHandler().
Referenced by XoopsPersistableObjectHandler().
XoopsPersistableObjectHandler::__call | ( | $name, | |
$args | |||
) |
Magic method for overloading of delegation
To be enabled in XOOPS 3.0 with PHP 5
protected
string | $name | method name |
array | $args | arguments |
Definition at line 1195 of file object.php.
References $handler, and loadHandler().
XoopsPersistableObjectHandler::cleanOrphan | ( | $table_link = '' , |
|
$field_link = '' , |
|||
$field_object = '' |
|||
) |
*#@- *#@+ Methods of sync handler XoopsObjectSync Clean orphan objects against linked objects
string | $table_link | table of linked object for JOIN |
string | $field_link | field of linked object for JOIN |
string | $field_object | field of current object for JOIN |
Definition at line 1537 of file object.php.
References $handler, $ret, and loadHandler().
Referenced by synchronization().
& XoopsPersistableObjectHandler::create | ( | $isNew = true | ) |
*#@+ Methods of native handler XoopsPersistableObjectHandler create a new object
protected
bool | $isNew | Flag the new objects as new |
Definition at line 1221 of file object.php.
XoopsPersistableObjectHandler::delete | ( | & | $object, |
$force = false |
|||
) |
delete an object from the database
object | $object | XoopsObject reference to the object to delete |
bool | $force |
Definition at line 1294 of file object.php.
References $handler, and loadHandler().
delete all objects matching the conditions
object | $criteria | CriteriaElement with conditions to meet |
bool | $force | force to delete |
bool | $asObject | delete in object way: instantiate all objects and delte one by one |
Definition at line 1308 of file object.php.
References $criteria, $handler, and loadHandler().
XoopsPersistableObjectHandler::deleteByLink | ( | $criteria = null | ) |
Delete objects matching a condition against linked objects
object | $criteria | CriteriaElement to match |
Definition at line 1515 of file object.php.
References $criteria, $handler, $ret, and loadHandler().
& XoopsPersistableObjectHandler::get | ( | $id = null , |
|
$fields = null |
|||
) |
Load a XoopsObject object from the database
protected
mixed | $id | ID |
array | $fields | fields to fetch |
Definition at line 1238 of file object.php.
References $fields, $keyName, $result, $sql, and XoopsObjectHandler\create().
& XoopsPersistableObjectHandler::getAll | ( | $criteria = null , |
|
$fields = null , |
|||
$asObject = true , |
|||
$id_as_key = true |
|||
) |
get all objects matching a condition
object | $criteria | CriteriaElement to match |
array | $fields | variables to fetch |
bool | $asObject | flag indicating as object, otherwise as array |
bool | $id_as_key | use the ID as key for the array |
Definition at line 1360 of file object.php.
References $criteria, $fields, $handler, $ret, and loadHandler().
& XoopsPersistableObjectHandler::getByLimit | ( | $limit = 0 , |
|
$start = 0 , |
|||
$criteria = null , |
|||
$fields = null , |
|||
$asObject = true |
|||
) |
get a limited list of objects matching a condition
int | $limit | Max number of objects to fetch |
int | $start | Which record to start at |
object | $criteria | CriteriaElement to match |
array | $fields | variables to fetch |
bool | $asObject | flag indicating as object, otherwise as array |
Definition at line 1407 of file object.php.
References $criteria, $fields, $handler, $limit, $ret, $start, and loadHandler().
& XoopsPersistableObjectHandler::getByLink | ( | $criteria = null , |
|
$fields = null , |
|||
$asObject = true , |
|||
$field_link = null , |
|||
$field_object = null |
|||
) |
*#@- *#@+ Methods of joint handler XoopsObjectJoint get a list of objects matching a condition joint with another related object
object | $criteria | CriteriaElement to match |
array | $fields | variables to fetch |
bool | $asObject | flag indicating as object, otherwise as array |
string | $field_link | field of linked object for JOIN |
string | $field_object | field of current object for JOIN |
Definition at line 1462 of file object.php.
References $criteria, $fields, $handler, $ret, and loadHandler().
Referenced by ProfileFieldHandler\loadFields().
XoopsPersistableObjectHandler::getCount | ( | $criteria = null | ) |
*#@- *#@+ Methods of stats handler XoopsObjectStats count objects matching a condition
object | $criteria | CriteriaElement to match |
Definition at line 1427 of file object.php.
References $criteria, $handler, and loadHandler().
Referenced by PmMessageHandler\getSavecount().
XoopsPersistableObjectHandler::getCountByLink | ( | $criteria = null | ) |
Count of objects matching a condition
object | $criteria | CriteriaElement to match |
Definition at line 1475 of file object.php.
References $criteria, $handler, $ret, and loadHandler().
XoopsPersistableObjectHandler::getCounts | ( | $criteria = null | ) |
Get counts of objects matching a condition
object | $criteria | CriteriaElement to match |
Definition at line 1439 of file object.php.
References $criteria, $handler, and loadHandler().
XoopsPersistableObjectHandler::getCountsByLink | ( | $criteria = null | ) |
array of count of objects matching a condition of, groupby linked object keyname
object | $criteria | CriteriaElement to match |
Definition at line 1488 of file object.php.
References $criteria, $handler, $ret, and loadHandler().
& XoopsPersistableObjectHandler::getIds | ( | $criteria = null | ) |
get IDs of objects matching a condition
object | $criteria | CriteriaElement to match |
Definition at line 1388 of file object.php.
References $criteria, $handler, $ret, and loadHandler().
XoopsPersistableObjectHandler::getList | ( | $criteria = null , |
|
$limit = 0 , |
|||
$start = 0 |
|||
) |
Retrieve a list of objects data
object | $criteria | CriteriaElement conditions to be met |
int | $limit | Max number of objects to fetch |
int | $start | Which record to start at |
Definition at line 1375 of file object.php.
References $criteria, $handler, $limit, $ret, $start, and loadHandler().
& XoopsPersistableObjectHandler::getObjects | ( | $criteria = null , |
|
$id_as_key = false , |
|||
$as_object = true |
|||
) |
*#@- *#@+ Methods of read handler XoopsObjectRead Retrieve objects from the database
object | $criteria | CriteriaElement conditions to be met |
bool | $id_as_key | use the ID as key for the array |
bool | $as_object | return an array of objects |
Definition at line 1344 of file object.php.
References $criteria, $handler, $ret, and loadHandler().
XoopsPersistableObjectHandler::insert | ( | & | $object, |
$force = true |
|||
) |
*#@- *#@+ Methods of write handler XoopsObjectWrite insert an object into the database
object | $object | XoopsObject reference to object |
bool | $force | flag to force the query execution despite security settings |
Definition at line 1281 of file object.php.
References $handler, and loadHandler().
XoopsPersistableObjectHandler::loadHandler | ( | $name, | |
$args = null |
|||
) |
Load predefined handler
protected
string | $name | handler name |
mixed | $args | args |
// Following code just kept as placeholder for PHP5 if (!isset(self::$handlers[$name])) { self::$handlers[$name] = XoopsModelFactory::loadHandler($this, $name, $args); } else { self::$handlers[$name]->setHandler($this); self::$handlers[$name]->setVars($args); }
return self::$handlers[$name];
Definition at line 1160 of file object.php.
References $handlers, XoopsModelFactory\loadHandler(), and xoops_load().
Referenced by __call(), cleanOrphan(), delete(), deleteAll(), deleteByLink(), getAll(), getByLimit(), getByLink(), getCount(), getCountByLink(), getCounts(), getCountsByLink(), getIds(), getList(), getObjects(), insert(), updateAll(), and updateByLink().
XoopsPersistableObjectHandler::setHandler | ( | $handler = null , |
|
$args = null , |
|||
$path = null |
|||
) |
Set custom handler
protected
object | $ the handler | |
mixed | $ args | |
string | $path | path to class |
Definition at line 1140 of file object.php.
References $handler, $path, XoopsModelFactory\loadHandler(), and xoops_load().
XoopsPersistableObjectHandler::synchronization | ( | ) |
Synchronizing objects
Definition at line 1549 of file object.php.
References cleanOrphan().
XoopsPersistableObjectHandler::updateAll | ( | $fieldname, | |
$fieldvalue, | |||
$criteria = null , |
|||
$force = false |
|||
) |
Change a field for objects with a certain criteria
string | $fieldname | Name of the field |
mixed | $fieldvalue | Value to write |
object | $criteria | CriteriaElement |
bool | $force | force to query |
Definition at line 1323 of file object.php.
References $criteria, $handler, and loadHandler().
Referenced by PmMessageHandler\setFromdelete(), PmMessageHandler\setFromsave(), PmMessageHandler\setRead(), PmMessageHandler\setTodelete(), and PmMessageHandler\setTosave().
XoopsPersistableObjectHandler::updateByLink | ( | $data, | |
$criteria = null |
|||
) |
upate objects matching a condition against linked objects
array | $data | array of key => value |
object | $criteria | CriteriaElement to match |
Definition at line 1502 of file object.php.
References $criteria, $handler, $ret, and loadHandler().
XoopsPersistableObjectHandler::XoopsPersistableObjectHandler | ( | $db = null , |
|
$table = '' , |
|||
$className = '' , |
|||
$keyName = '' , |
|||
$identifierName = '' |
|||
) |
Constructor
protected
Definition at line 1126 of file object.php.
References $className, XoopsObjectHandler\$db, $identifierName, $keyName, $table, and __construct().
XoopsPersistableObjectHandler::$className |
Definition at line 1092 of file object.php.
Referenced by ArtObjectHandler\__construct(), __construct(), ArtObjectHandler\ArtObjectHandler(), and XoopsPersistableObjectHandler().
XoopsPersistableObjectHandler::$handler |
holds reference to custom extended object handler
var object
private static protected
Definition at line 1066 of file object.php.
Referenced by __call(), cleanOrphan(), delete(), deleteAll(), deleteByLink(), getAll(), getByLimit(), getByLink(), getCount(), getCountByLink(), getCounts(), getCountsByLink(), getIds(), getList(), getObjects(), insert(), setHandler(), updateAll(), and updateByLink().
XoopsPersistableObjectHandler::$handlers = array('read' => null , 'stats' => null , 'joint' => null , 'write' => null , 'sync' => null) |
holds reference to predefined extended object handlers: read, stats, joint, write, sync
The handlers hold methods for different purposes, which could be all put together inside of current class. However, load codes only if they are necessary, thus they are now splitted out.
var array of objects
private static protected
Definition at line 1081 of file object.php.
Referenced by loadHandler().
XoopsPersistableObjectHandler::$identifierName |
Definition at line 1093 of file object.php.
Referenced by ArtObjectHandler\__construct(), __construct(), ArtObjectHandler\ArtObjectHandler(), and XoopsPersistableObjectHandler().
XoopsPersistableObjectHandler::$keyName |
Definition at line 1091 of file object.php.
Referenced by ArtObjectHandler\__construct(), __construct(), ArtObjectHandler\ArtObjectHandler(), get(), and XoopsPersistableObjectHandler().
XoopsPersistableObjectHandler::$table |
Definition at line 1090 of file object.php.
Referenced by ArtObjectHandler\__construct(), __construct(), ArtObjectHandler\ArtObjectHandler(), and XoopsPersistableObjectHandler().