36 if (!is_array($this->attributes)) {
37 $this->attributes = array();
40 $this->attributes[
'time_created'] = null;
62 return $this->
$name !== null;
73 abstract protected function get(
$name);
91 abstract public function getURL();
98 abstract public function save();
105 abstract public function delete();
121 abstract public function toObject();
135 return get_class($this);
152 $this->
valid = (
false !== reset($this->attributes));
163 return current($this->attributes);
174 return key($this->attributes);
185 $this->
valid = (
false !==
next($this->attributes));
214 if (array_key_exists(
$key, $this->attributes)) {
229 if (array_key_exists(
$key, $this->attributes)) {
230 return $this->attributes[
$key];
245 if (array_key_exists(
$key, $this->attributes)) {
247 $this->attributes[
$key] =
"";
261 return array_key_exists(
$offset, $this->attributes);
getDatabase()
Provides a pointer to the database object.
getClassName()
Return the class name of the object.
offsetSet($key, $value)
Array access interface.
valid()
Iterator interface.
getTimeCreated()
Returns the UNIX epoch time that this entity was created.
next()
Iterator interface.
if($guid==elgg_get_logged_in_user_guid()) $name
offsetUnset($key)
Array access interface.
__isset($name)
Test if property is set either as an attribute or metadata.
initializeAttributes()
Initialize the attributes array.
toObject()
Get a plain old object copy for public consumption.
elgg_deprecated_notice($msg, $dep_version, $backtrace_level=1)
Log a notice about deprecated use of a function, view, etc.
$attributes
The main attributes of an entity.
current()
Iterator interface.
_elgg_services(\Elgg\Di\ServiceProvider $services=null)
Get the global service provider.
offsetGet($key)
Array access interface.
save()
Save this data to the appropriate database table.
trait TimeUsing
Adds methods for setting the current time (for testing)
offsetExists($offset)
Array access interface.
getURL()
Get a URL for this object.
rewind()
Iterator interface.