extends |
XoopsObjectHandler |
---|
Persistable Object Handler class.
Methods | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
public
|
__construct(
null|XoopsDatabase $db = null,
string $table = '',
string $className = '',
string $keyName = '',
string $identifierName = '',
)
Constructor
Constructor Parameters
OverridesOverriden by
|
# | ||||||||||
public
|
XoopsPersistableObjectHandler(
null|XoopsDatabase $db = null,
string $table = '',
string $className = '',
string $keyName = '',
string $identifierName = '',
)
PHP 4 style constructor compatibility shim
PHP 4 style constructor compatibility shim Deprecatedall callers should be using parent::__construct() Parameters
|
# | ||||||||||
public
|
loadHandler(string $name, mixed $args = null): XoopsModelAbstract
Load predefined handler
Load predefined handler Parameters
Returnsof handler {@link XoopsModelAbstract} |
# | ||||||||||
public
|
__call(string $name, array $args): mixed
Magic method for overloading of delegation
Magic method for overloading of delegation To be enabled in XOOPS 3.0 with PHP 5 Parameters
|
# | ||||||||||
public
|
create(bool $isNew = true): XoopsObject
create a new object
create a new object Parameters
Returns{@link XoopsObject} OverridesOverriden by |
# | ||||||||||
public
|
get(mixed $id = null, array|null $fields = null): XoopsObject|null
Load a {@link XoopsObject} object from the database
Load a {@link XoopsObject} object from the database Parameters
Returns{@link XoopsObject} Overrides |
# | ||||||||||
public
|
insert(XoopsObject $object, bool $force = true): mixed
insert an object into the database
insert an object into the database Parameters
Returnsobject ID OverridesOverriden by |
# | ||||||||||
public
|
delete(XoopsObject $object, bool $force = false): bool
delete an object from the database
delete an object from the database Parameters
ReturnsFALSE if failed. OverridesOverriden by |
# | ||||||||||
public
|
deleteAll(CriteriaElement|null $criteria = null, bool $force = true, bool $asObject = false): bool|int
delete all objects matching the conditions
delete all objects matching the conditions Parameters
|
# | ||||||||||
public
|
updateAll(string $fieldname, mixed $fieldvalue, CriteriaElement|null $criteria = null, bool $force = false): bool
Change a field for objects with a certain criteria
Change a field for objects with a certain criteria Parameters
|
# | ||||||||||
public
&
|
getObjects(CriteriaElement|null $criteria = null, bool $id_as_key = false, bool $as_object = true): array
Retrieve objects from the database
Retrieve objects from the database Parameters
Overriden by |
# | ||||||||||
public
&
|
getAll(
CriteriaElement|null $criteria = null,
array|null $fields = null,
bool $asObject = true,
bool $id_as_key = true,
): array
get all objects matching a condition
get all objects matching a condition Parameters
Returnsof objects/array {@link XoopsObject} |
# | ||||||||||
public
|
getList(CriteriaElement|null $criteria = null, int $limit = 0, int $start = 0): array
Retrieve a list of objects data
Retrieve a list of objects data Parameters
|
# | ||||||||||
public
&
|
getIds(CriteriaElement|null $criteria = null): array
get IDs of objects matching a condition
get IDs of objects matching a condition Parameters
Returnsof object IDs |
# | ||||||||||
public
&
|
getByLimit(
int $limit = 0,
int $start = 0,
CriteriaElement|null $criteria = null,
array|null $fields = null,
bool $asObject = true,
): array
get a limited list of objects matching a condition
get a limited list of objects matching a condition {@link CriteriaCompo} Parameters
Returnsof objects {@link XoopsObject} |
# | ||||||||||
public
|
getCount(CriteriaElement|null $criteria = null): int
count objects matching a condition
count objects matching a condition Parameters
Returnscount of objects |
# | ||||||||||
public
|
getCounts(CriteriaElement|null $criteria = null): array
Get counts of objects matching a condition
Get counts of objects matching a condition Parameters
Returnsof counts |
# | ||||||||||
public
&
|
getByLink(
CriteriaElement|null $criteria = null,
array|null $fields = null,
bool $asObject = true,
string|null $field_link = null,
string|null $field_object = null,
): array
get a list of objects matching a condition joint with another related object
get a list of objects matching a condition joint with another related object Parameters
Returnsof objects {@link XoopsObject} |
# | ||||||||||
public
|
getCountByLink(CriteriaElement|null $criteria = null): int
Count of objects matching a condition
Count of objects matching a condition Parameters
Returnscount of objects |
# | ||||||||||
public
|
getCountsByLink(CriteriaElement|null $criteria = null): int
array of count of objects matching a condition of, groupby linked object keyname
array of count of objects matching a condition of, groupby linked object keyname Parameters
Returnscount of objects |
# | ||||||||||
public
|
updateByLink(array $data, CriteriaElement|null $criteria = null): int
update objects matching a condition against linked objects
update objects matching a condition against linked objects Parameters
Returnscount of objects |
# | ||||||||||
public
|
deleteByLink(CriteriaElement|null $criteria = null): int|null
Delete objects matching a condition against linked objects
Delete objects matching a condition against linked objects Parameters
Returnscount of objects |
# | ||||||||||
public
|
cleanOrphan(string $table_link = '', string $field_link = '', string $field_object = ''): bool
Clean orphan objects against linked objects
Clean orphan objects against linked objects Parameters
Returnstrue on success |
# | ||||||||||
public
|
synchronization(): bool
Synchronizing objects
Synchronizing objects Returnstrue on success |
# | ||||||||||
public
|
convertResultSet($result, $id_as_key = false, $as_object = true)
*#@-
*#@- |
# |
Methods inherited from XoopsObjectHandler |
---|
XoopsObjectHandler(), |
Properties | |||
---|---|---|---|
public
|
|
$table_link
|
# |
public
|
|
$handler
static protected
static protected |
# |
public
|
|
$handlers = ['read' => null, 'stats' => null, 'joint' => null, 'write' => null, 'sync' => null]
static protected
static protected |
# |
public
|
string
|
$table
|
# |
public
|
string
|
$keyName
|
# |
public
|
string
|
$className
|
# |
public
|
string
|
$identifierName
|
# |
public
|
string
|
$field_link
|
# |
public
|
string
|
$field_object
|
# |
Properties inherited from XoopsObjectHandler |
---|
$db |