PHP Class TreeBehavior

Long description for file
Inheritance: extends ModelBehavior
Afficher le fichier Open project: openeyes/openeyes Class Usage Examples

Méthodes publiques

Свойство Type Description
$idAttribute
$leftAttribute
$rightAttribute

Protected Properties

Свойство Type Description
$_cacheStub

Méthodes publiques

Méthode Description
ancestorIds ( ) returns all parent object ids (note there may be more than one because any object can exist in more than one tree).
ancestorIdsMatch ( $ids, $ancestor_ids ) * utlity function that will check whether any of the list $ids appear in the trees of any of the $ancestor_ids (including the ancestor ids themselves)
ancestorOfIds ( $ids ) returns true if the owner is an ancestor of any of the ids passed in.
childIds ( ) immediate child ids of the object (note that these children might not be all in one tree, given that a node can exist in more than one tree).
children ( )
descendentIds ( ) returns all descendant ids of the object, across any trees the the object exists in.
parentIds ( ) get immediate parent ids for the object (note there may be more than one because any disorder can exist in more than one tree).
rootIds ( ) returns the object ids that are at the top of trees.
treeStart ( ) works out the starting point for a new tree.
treeTable ( ) : string

Méthodes protégées

Méthode Description
_ancestorIds ( CDbConnection $db, string $table, string $obj_id ) Returns all the ancestor ids of the provided object id.
_descendentIds ( $db, $tree_table, $obj_id ) * gets the list of left and right boundaries for any given owner objects
_treeLimits ( CDbConnection $db, string $tree_table, string $obj_id ) gets the list of left and right boundaries for any given owner objects.
getCacheStub ( )
treeLimits ( $owner ) * gets the list of left and right boundaries for any given owner objects

Method Details

_ancestorIds() protected méthode

Returns all the ancestor ids of the provided object id.
protected _ancestorIds ( CDbConnection $db, string $table, string $obj_id )
$db CDbConnection
$table string
$obj_id string

_descendentIds() protected méthode

* gets the list of left and right boundaries for any given owner objects
protected _descendentIds ( $db, $tree_table, $obj_id )
$db
$tree_table
$obj_id

_treeLimits() protected méthode

gets the list of left and right boundaries for any given owner objects.
protected _treeLimits ( CDbConnection $db, string $tree_table, string $obj_id )
$db CDbConnection
$tree_table string
$obj_id string

ancestorIds() public méthode

returns all parent object ids (note there may be more than one because any object can exist in more than one tree).
public ancestorIds ( )

ancestorIdsMatch() public méthode

* utlity function that will check whether any of the list $ids appear in the trees of any of the $ancestor_ids (including the ancestor ids themselves)
public ancestorIdsMatch ( $ids, $ancestor_ids )

ancestorOfIds() public méthode

returns true if the owner is an ancestor of any of the ids passed in.
public ancestorOfIds ( $ids )

childIds() public méthode

immediate child ids of the object (note that these children might not be all in one tree, given that a node can exist in more than one tree).
public childIds ( )

children() public méthode

public children ( )

descendentIds() public méthode

returns all descendant ids of the object, across any trees the the object exists in.
public descendentIds ( )

getCacheStub() protected méthode

protected getCacheStub ( )

parentIds() public méthode

get immediate parent ids for the object (note there may be more than one because any disorder can exist in more than one tree).
public parentIds ( )

rootIds() public méthode

returns the object ids that are at the top of trees.
public rootIds ( )

treeLimits() protected méthode

* gets the list of left and right boundaries for any given owner objects
protected treeLimits ( $owner )
$owner

treeStart() public méthode

works out the starting point for a new tree.
public treeStart ( )

treeTable() public méthode

public treeTable ( ) : string
Résultat string the associated database table name

Property Details

$_cacheStub protected_oe property

protected $_cacheStub

$idAttribute public_oe property

public $idAttribute

$leftAttribute public_oe property

public $leftAttribute

$rightAttribute public_oe property

public $rightAttribute