Overview

Packages

  • ClipIt
    • clipit
      • api
    • urjc
      • backend
  • Elgg
    • Core
      • Access
      • Authentication
      • Cache
      • Caches
      • Core
      • DataMode
        • Site
      • DataModel
        • Annotations
        • Entities
        • Extender
        • File
        • Importable
        • Loggable
        • Notable
        • Object
        • User
      • DataStorage
      • Exception
      • Exceptions
        • Stub
      • FileStore
        • Disk
      • Groups
      • Helpers
      • HMAC
      • Memcache
      • Metadata
      • Navigation
      • ODD
      • Output
      • Plugins
        • Settings
      • Sessions
      • SocialModel
        • Friendable
        • Locatable
      • WebServicesAPI
      • Widgets
      • XML
      • XMLRPC
    • Exceptions
      • Stub
  • None
  • PHP

Classes

  • ElggRelationship
  • ElggRiverItem
  • Overview
  • Package
  • Class
  • Tree

Class ElggRelationship

Relationship class.

ElggData implements Loggable, Iterator, ArrayAccess, Exportable
Extended by ElggRelationship implements Importable
Package: Elgg\Core\Core
Located at ElggRelationship.php
Methods summary
public
# __construct( mixed $id = null )

Create a relationship object, optionally from a given id value or row.

Create a relationship object, optionally from a given id value or row.

Parameters

$id
mixed
$id ElggRelationship id, database row, or null for new relationship
public mixed
# get( string $name )

Class member get overloading

Class member get overloading

Parameters

$name
string
$name Name

Returns

mixed
public mixed
# set( string $name, mixed $value )

Class member set overloading

Class member set overloading

Parameters

$name
string
$name Name
$value
mixed
$value Value

Returns

mixed
public integer
# save( )

Save the relationship

Save the relationship

Returns

integer
the relationship id

Throws

IOException
public boolean
# delete( )

Delete a given relationship.

Delete a given relationship.

Returns

boolean
public string
# getURL( )

Get a URL for this relationship.

Get a URL for this relationship.

Returns

string
public array
# getExportableValues( )

Return an array of fields which can be exported.

Return an array of fields which can be exported.

Returns

array
public array
# export( )

Export this relationship

Export this relationship

Returns

array
public boolean
# import( ODD $data )

Import a relationship

Import a relationship

Parameters

$data
ODD
$data ODD data

Returns

boolean

Throws

ImportException|InvalidParameterException

Implementation of

Importable::import()
public integer
# getSystemLogID( )

Return an identification for the object for storage in the system log. This id must be an integer.

Return an identification for the object for storage in the system log. This id must be an integer.

Returns

integer
public ElggRelationship
# getObjectFromID( integer $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.

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

$id
integer
$id ID

Returns

ElggRelationship
public string
# getType( )

Return a type of the object - eg. object, group, user, relationship, metadata, annotation etc

Return a type of the object - eg. object, group, user, relationship, metadata, annotation etc

Returns

string
'relationship'
public string
# getSubtype( )

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

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

Returns

string
Methods inherited from ElggData
__get(), __isset(), __set(), current(), getClassName(), getTimeCreated(), initializeAttributes(), key(), next(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), rewind(), valid()
Properties inherited from ElggData
$attributes, $valid
Magic properties summary
public integer $id
#

The unique identifier (read-only)

The unique identifier (read-only)

public integer $guid_one
#

The GUID of the subject of the relationship

The GUID of the subject of the relationship

public string $relationship
#

The name of the relationship

The name of the relationship

public integer $guid_two
#

The GUID of the object of the relationship

The GUID of the object of the relationship

public integer $time_created
#

A UNIX timestamp of when the relationship was created (read-only, set on first save)

A UNIX timestamp of when the relationship was created (read-only, set on first save)

Magic properties inherited from ElggData
$owner_guid
API documentation generated by ApiGen 2.8.0