38 if (!is_array($this->attributes)) {
39 $this->attributes = [];
42 $this->attributes[
'time_created'] = null;
64 return $this->
$name !== null;
85 abstract public function getURL();
92 abstract public function save();
99 abstract public function delete();
107 return $this->attributes[
'time_created'];
133 $this->
valid = (
false !== reset($this->attributes));
144 return current($this->attributes);
155 return key($this->attributes);
166 $this->
valid = (
false !==
next($this->attributes));
195 if (array_key_exists(
$key, $this->attributes)) {
210 if (array_key_exists(
$key, $this->attributes)) {
227 if (array_key_exists(
$key, $this->attributes)) {
243 return array_key_exists(
$offset, $this->attributes);
250 return $this->getSystemLogID();
getDatabase()
Provides a pointer to the database object.
offsetSet($key, $value)
Array access interface.
valid()
Iterator interface.
if(!$user||!$user->canDelete()) $name
getTimeCreated()
Returns the UNIX epoch time that this entity was created.
next()
Iterator interface.
$params
Saves global plugin settings.
Collection item interface.
offsetUnset($key)
Array access interface.
__isset($name)
Test if property is set either as an attribute or metadata.
getPriority()
{Get priority (weight) of the item within a collection.int}
getId()
{Get unique item identifier within a collection.string|int}
initializeAttributes()
Initialize the attributes array.
$attributes
The main attributes of an entity.
current()
Iterator interface.
offsetGet($key)
Array access interface.
save()
Save this data to the appropriate database table.
if($container instanceof ElggGroup &&$container->guid!=elgg_get_page_owner_guid()) $key
unserialize($serialized)
{}
__unset($name)
Unset a property from metadata or attribute.
_elgg_services()
Get the global service provider.
trait TimeUsing
Adds methods for setting the current time (for testing)
toObject(array $params=[])
Get a plain old object copy for public consumption.
offsetExists($offset)
Array access interface.
getURL()
Get a URL for this object.
rewind()
Iterator interface.