Elgg  Version 3.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ElggData Class Reference
Inheritance diagram for ElggData:
Elgg\Collections\CollectionItemInterface ElggAccessCollection ElggEntity ElggExtender ElggRelationship ElggGroup ElggObject ElggSite ElggUser Represents ElggAnnotation ElggMetadata ElggComment ElggFile ElggPlugin ElggUpgrade ElggWidget ElggIcon ElggTempFile

Public Member Functions

 __isset ($name)
 Test if property is set either as an attribute or metadata. More...
 
 getURL ()
 Get a URL for this object. More...
 
 save ()
 Save this data to the appropriate database table. More...
 
 delete ()
 Delete this data. More...
 
 getTimeCreated ()
 Returns the UNIX epoch time that this entity was created. More...
 
 toObject (array $params=[])
 Get a plain old object copy for public consumption. More...
 
 rewind ()
 Iterator interface. More...
 
 current ()
 Iterator interface. More...
 
 key ()
 Iterator interface. More...
 
 next ()
 Iterator interface. More...
 
 valid ()
 Iterator interface. More...
 
 offsetSet ($key, $value)
 Array access interface. More...
 
 offsetGet ($key)
 Array access interface. More...
 
 offsetUnset ($key)
 Array access interface. More...
 
 offsetExists ($offset)
 Array access interface. More...
 
 getId ()
 {Get unique item identifier within a collection.
Returns
string|int
} More...
 
 getPriority ()
 {Get priority (weight) of the item within a collection.
Returns
int
} More...
 
 serialize ()
 {} More...
 
 unserialize ($serialized)
 {} More...
 

Protected Member Functions

 initializeAttributes ()
 Initialize the attributes array. More...
 
 getDatabase ()
 Provides a pointer to the database object. More...
 

Protected Attributes

 $attributes = []
 The main attributes of an entity. More...
 
 $valid = false
 

Detailed Description

Definition at line 12 of file ElggData.php.

Member Function Documentation

ElggData::__isset (   $name)

Test if property is set either as an attribute or metadata.

Use isset($entity->property)

Parameters
string$nameThe name of the attribute or metadata.
Returns
bool

Definition at line 63 of file ElggData.php.

ElggData::current ( )

Iterator interface.

See also
Iterator::current()
Returns
mixed

Definition at line 130 of file ElggData.php.

ElggData::delete ( )
abstract

Delete this data.

Returns
bool
ElggData::getDatabase ( )
protected

Provides a pointer to the database object.

Returns
The database where this data is (will be) stored.

Definition at line 50 of file ElggData.php.

ElggData::getId ( )

{Get unique item identifier within a collection.

Returns
string|int
}

Implements Elgg\Collections\CollectionItemInterface.

Definition at line 236 of file ElggData.php.

ElggData::getPriority ( )

{Get priority (weight) of the item within a collection.

Returns
int
}

Implements Elgg\Collections\CollectionItemInterface.

Definition at line 243 of file ElggData.php.

ElggData::getTimeCreated ( )

Returns the UNIX epoch time that this entity was created.

Returns
int UNIX epoch time

Definition at line 93 of file ElggData.php.

ElggData::getURL ( )
abstract

Get a URL for this object.

Returns
string
ElggData::initializeAttributes ( )
protected

Initialize the attributes array.

This is vital to distinguish between metadata and base parameters.

Returns
void

Definition at line 36 of file ElggData.php.

ElggData::key ( )

Iterator interface.

See also
Iterator::key()
Returns
string

Definition at line 141 of file ElggData.php.

ElggData::next ( )

Iterator interface.

See also
Iterator::next()
Returns
void

Definition at line 152 of file ElggData.php.

ElggData::offsetExists (   $offset)

Array access interface.

See also
::offsetExists()
Parameters
int$offsetOffset
Returns
bool

Definition at line 229 of file ElggData.php.

ElggData::offsetGet (   $key)

Array access interface.

See also
::offsetGet()
Parameters
mixed$keyName
Returns
mixed

Definition at line 196 of file ElggData.php.

ElggData::offsetSet (   $key,
  $value 
)

Array access interface.

See also
::offsetSet()
Parameters
mixed$keyName
mixed$valueValue
Returns
void

Definition at line 181 of file ElggData.php.

ElggData::offsetUnset (   $key)

Array access interface.

See also
::offsetUnset()
Parameters
mixed$keyName
Returns
void

Definition at line 213 of file ElggData.php.

ElggData::rewind ( )

Iterator interface.

See also
Iterator::rewind()
Returns
void

Definition at line 119 of file ElggData.php.

ElggData::save ( )
abstract

Save this data to the appropriate database table.

Returns
bool
ElggData::serialize ( )

{}

Definition at line 250 of file ElggData.php.

ElggData::toObject ( array  $params = [])
abstract

Get a plain old object copy for public consumption.

Parameters
array$paramsExport parameters
Returns
ElggData::unserialize (   $serialized)

{}

Definition at line 257 of file ElggData.php.

ElggData::valid ( )

Iterator interface.

See also
Iterator::valid()
Returns
bool

Definition at line 163 of file ElggData.php.

Member Data Documentation

ElggData::$attributes = []
protected

The main attributes of an entity.

Holds attributes to save to database Blank entries for all database fields should be created by the constructor. Subclasses should add to this in their constructors. Any field not appearing in this will be viewed as metadata

Definition at line 27 of file ElggData.php.

ElggData::$valid = false
protected

Definition at line 110 of file ElggData.php.


The documentation for this class was generated from the following file: