PHP Класс TreeBehavior

Long description for file
Наследование: extends ModelBehavior
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$idAttribute
$leftAttribute
$rightAttribute

Защищенные свойства (Protected)

Свойство Тип Описание
$_cacheStub

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
_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

Описание методов

_ancestorIds() защищенный Метод

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() защищенный Метод

* 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() защищенный Метод

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() публичный Метод

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() публичный Метод

* 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() публичный Метод

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

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).
public childIds ( )

children() публичный Метод

public children ( )

descendentIds() публичный Метод

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

getCacheStub() защищенный Метод

protected getCacheStub ( )

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).
public parentIds ( )

rootIds() публичный Метод

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

treeLimits() защищенный Метод

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

treeStart() публичный Метод

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

treeTable() публичный Метод

public treeTable ( ) : string
Результат string the associated database table name

Описание свойств

$_cacheStub защищенное свойство

protected $_cacheStub

$idAttribute публичное свойство

public $idAttribute

$leftAttribute публичное свойство

public $leftAttribute

$rightAttribute публичное свойство

public $rightAttribute