Elgg  Version 2.3
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
ElggRelationship Class Reference
Inheritance diagram for ElggRelationship:
ElggData Importable Loggable Exportable

Public Member Functions

 __construct ($row=null)
 Create a relationship object. More...
 
 __set ($name, $value)
 Set an attribute of the relationship. More...
 
 set ($name, $value)
 Class member set overloading. More...
 
 __get ($name)
 Get an attribute of the relationship. More...
 
 get ($name)
 Class member get overloading. More...
 
 save ()
 Save the relationship. More...
 
 delete ()
 Delete this relationship from the database. More...
 
 getURL ()
 Get a URL for this relationship. More...
 
 toObject ()
 {} More...
 
 getExportableValues ()
 Return an array of fields which can be exported. More...
 
 export ()
 Export this relationship. More...
 
 import (ODD $data)
 Import a relationship. More...
 
 getSystemLogID ()
 Return an identification for the object for storage in the system log. More...
 
 getObjectFromID ($id)
 For a given ID, return the object associated with it. More...
 
 getType ()
 Return a type of the object - eg. More...
 
 getSubtype ()
 Return a subtype. More...
 
- Public Member Functions inherited from ElggData
 __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 Attributes

const RELATIONSHIP_LIMIT = 50
 

Protected Member Functions

 initializeAttributes ()
 (non-PHPdoc) More...
 
- Protected Member Functions inherited from ElggData
 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...
 

Additional Inherited Members

- Protected Attributes inherited from ElggData
 $attributes = array()
 The main attributes of an entity. More...
 
 $valid = false
 

Detailed Description

Definition at line 14 of file ElggRelationship.php.

Constructor & Destructor Documentation

ElggRelationship::__construct (   $row = null)

Create a relationship object.

Parameters
\stdClass$rowDatabase row or null for new relationship
Exceptions
InvalidArgumentException

Definition at line 26 of file ElggRelationship.php.

Member Function Documentation

ElggRelationship::__get (   $name)

Get an attribute of the relationship.

Parameters
string$nameName
Returns
mixed

Definition at line 101 of file ElggRelationship.php.

ElggRelationship::__set (   $name,
  $value 
)

Set an attribute of the relationship.

Parameters
string$nameName
mixed$valueValue
Returns
void

Definition at line 77 of file ElggRelationship.php.

ElggRelationship::delete ( )

Delete this relationship from the database.

Returns
bool

Definition at line 150 of file ElggRelationship.php.

ElggRelationship::export ( )

Export this relationship.

Returns
array

Implements Exportable.

Definition at line 232 of file ElggRelationship.php.

ElggRelationship::get (   $name)

Class member get overloading.

Parameters
string$nameName
Returns
mixed

Definition at line 116 of file ElggRelationship.php.

ElggRelationship::getExportableValues ( )

Return an array of fields which can be exported.

Returns
array

Implements Exportable.

Definition at line 216 of file ElggRelationship.php.

ElggRelationship::getObjectFromID (   $id)

For a given ID, return the object associated with it.

This is used by the river functionality primarily. This is useful for checking access permissions etc on objects.

Parameters
int$idID
Returns

Implements Loggable.

Definition at line 315 of file ElggRelationship.php.

ElggRelationship::getSubtype ( )

Return a subtype.

For metadata & annotations this is the 'name' and for relationship this is the relationship type.

Returns
string

Implements Loggable.

Definition at line 334 of file ElggRelationship.php.

ElggRelationship::getSystemLogID ( )

Return an identification for the object for storage in the system log.

This id must be an integer.

Returns
int

Implements Loggable.

Definition at line 302 of file ElggRelationship.php.

ElggRelationship::getType ( )

Return a type of the object - eg.

object, group, user, relationship, metadata, annotation etc

Returns
string 'relationship'

Implements Loggable.

Definition at line 324 of file ElggRelationship.php.

ElggRelationship::getURL ( )

Get a URL for this relationship.

Plugins can register for the 'relationship:url', 'relationship' plugin hook to customize the url for a relationship.

Returns
string

Definition at line 162 of file ElggRelationship.php.

ElggRelationship::import ( ODD  $data)

Import a relationship.

Parameters
ODD$dataODD data
Returns
bool
Exceptions
ImportException|InvalidParameterException

Implements Importable.

Definition at line 257 of file ElggRelationship.php.

ElggRelationship::initializeAttributes ( )
protected

(non-PHPdoc)

See also
::initializeAttributes()
Returns
void

Definition at line 61 of file ElggRelationship.php.

ElggRelationship::save ( )

Save the relationship.

Returns
int the relationship ID
Exceptions
IOException

Definition at line 127 of file ElggRelationship.php.

ElggRelationship::set (   $name,
  $value 
)

Class member set overloading.

Parameters
string$nameName
mixed$valueValue
Returns
mixed

Definition at line 89 of file ElggRelationship.php.

ElggRelationship::toObject ( )

{}

Definition at line 197 of file ElggRelationship.php.

Member Data Documentation

const ElggRelationship::RELATIONSHIP_LIMIT = 50

Definition at line 18 of file ElggRelationship.php.


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