Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ElggData Class Reference
Inheritance diagram for ElggData:
Loggable Exportable ElggEntity ElggExtender ElggRelationship ElggGroup ElggObject ElggSite ElggUser ElggAnnotation ElggMetadata ElggComment ElggFile ElggPlugin ElggUpgrade ElggWidget ElggIcon

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 ()
 Get a plain old object copy for public consumption. More...
 
 getClassName ()
 Return the class name of the object. 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...
 
- Public Member Functions inherited from Loggable
 getSystemLogID ()
 Return an identification for the object for storage in the system log. More...
 
 getType ()
 Return the type of the object - eg. More...
 
 getSubtype ()
 Return a subtype. More...
 
 getObjectFromID ($id)
 For a given ID, return the object associated with it. More...
 
- Public Member Functions inherited from Exportable
 export ()
 This must take the contents of the object and convert it to exportable ODD. More...
 
 getExportableValues ()
 Return a list of all fields that can be exported. More...
 

Protected Member Functions

 initializeAttributes ()
 Initialize the attributes array. More...
 
 getDatabase ()
 Provides a pointer to the database object. More...
 
 get ($name)
 Fetch the specified attribute. More...
 
 set ($name, $value)
 Set the specified attribute. More...
 

Protected Attributes

 $attributes = array()
 The main attributes of an entity. More...
 
 $valid = false
 

Detailed Description

Definition at line 9 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 59 of file ElggData.php.

ElggData::current ( )

Iterator interface.

See Also
Iterator::current()
Returns
mixed

Definition at line 160 of file ElggData.php.

ElggData::delete ( )
abstract

Delete this data.

Returns
bool
ElggData::get (   $name)
abstractprotected

Fetch the specified attribute.

Parameters
string$nameThe attribute to fetch
Returns
mixed The attribute, if it exists. Otherwise, null.
ElggData::getClassName ( )

Return the class name of the object.

Returns
string

Implements Loggable.

Definition at line 131 of file ElggData.php.

ElggData::getDatabase ( )
protected

Provides a pointer to the database object.

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

Definition at line 46 of file ElggData.php.

ElggData::getTimeCreated ( )

Returns the UNIX epoch time that this entity was created.

Returns
int UNIX epoch time

Definition at line 110 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 32 of file ElggData.php.

ElggData::key ( )

Iterator interface.

See Also
Iterator::key()
Returns
string

Definition at line 171 of file ElggData.php.

ElggData::next ( )

Iterator interface.

See Also
Iterator::next()
Returns
void

Definition at line 182 of file ElggData.php.

ElggData::offsetExists (   $offset)

Array access interface.

See Also
::offsetExists()
Parameters
int$offsetOffset
Returns
int

Definition at line 258 of file ElggData.php.

ElggData::offsetGet (   $key)

Array access interface.

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

Definition at line 226 of file ElggData.php.

ElggData::offsetSet (   $key,
  $value 
)

Array access interface.

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

Definition at line 211 of file ElggData.php.

ElggData::offsetUnset (   $key)

Array access interface.

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

Definition at line 242 of file ElggData.php.

ElggData::rewind ( )

Iterator interface.

See Also
Iterator::rewind()
Returns
void

Definition at line 149 of file ElggData.php.

ElggData::save ( )
abstract

Save this data to the appropriate database table.

Returns
bool
ElggData::set (   $name,
  $value 
)
abstractprotected

Set the specified attribute.

Parameters
string$nameThe attribute to set
mixed$valueThe value to set it to
Returns
bool The success of your set function?
ElggData::toObject ( )
abstract

Get a plain old object copy for public consumption.

Returns
ElggData::valid ( )

Iterator interface.

See Also
Iterator::valid()
Returns
bool

Definition at line 193 of file ElggData.php.

Member Data Documentation

ElggData::$attributes = array()
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 23 of file ElggData.php.

ElggData::$valid = false
protected

Definition at line 140 of file ElggData.php.


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