43 $this->cache = $values;
73 return $obj ? $obj->id :
false;
91 return isset(
$cache[$subtype_id]) ?
$cache[$subtype_id]->subtype :
false;
131 return $obj ? $obj->class : null;
151 return isset(
$cache[$subtype_id]) ?
$cache[$subtype_id]->class : null;
183 INSERT INTO {$this->db->prefix}entity_subtypes 184 (type, subtype, class) VALUES 185 (:type, :subtype, :class) 216 DELETE FROM {$this->db->prefix}entity_subtypes 217 WHERE type = :type AND subtype = :subtype 223 if (!$this->db->deleteData($sql,
$params)) {
248 UPDATE {$this->db->prefix}entity_subtypes 249 SET type = :type, subtype = :subtype, class = :class 258 if (!$this->db->updateData($sql,
false,
$params)) {
284 if ($this->cache === null) {
285 $rows = $this->db->getData(
" 287 FROM {$this->db->prefix}entity_subtypes 292 $this->cache[$row->id] =
$row;
update($type, $subtype, $class= '')
Update a registered type, subtype, and class name.
setCachedValues(array $values)
Set the cached values from the boot data.
retrieveFromCache($type, $subtype)
Retrieve subtype from the cache.
getPopulatedCache()
Get a populated cache object.
__construct(Database $db)
Constructor.
invalidateCache()
Empty the cache.
_elgg_services(\Elgg\Di\ServiceProvider $services=null)
Get the global service provider.
add($type, $subtype, $class="")
Register with a certain type and subtype to be loaded as a specific class.
getClassFromId($subtype_id)
Returns the class name for a subtype id.
getSubtype($subtype_id)
Gets the denormalized string for a given subtype ID.
getId($type, $subtype)
Return the id for a given subtype.
if(!$collection_name) $id
http free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
getClass($type, $subtype)
Return the class name for a registered type and subtype.