PHP Класс Baum\SetBuilder

Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$bounds array Array which will hold temporary lft, rgt index values for each scope.
$node Node Node instance for reference.

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

Метод Описание
__construct ( Node $node ) : void Create a new \Baum\SetBuilder class instance.
children ( Baum\Node $node ) : Illuminate\Database\Eloquent\Collection Return all children for the specified node.
rebuild ( ) : void Perform the re-calculation of the left and right indexes of the whole nested set tree structure.
rebuildBounds ( $node, $depth ) Recompute left and right index bounds for the specified node and its children (recursive call). Fill the depth column too.
roots ( ) : Illuminate\Database\Eloquent\Collection Return all root nodes for the current database table appropiately sorted.

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

Метод Описание
getNextBound ( string $key ) : integer Return next index bound value for the given key (current scope identifier).
qualify ( $column ) : string Get the fully qualified value for the specified column.
scopedAttributes ( Baum\Node $node ) : array Return an array of the scoped attributes of the supplied node.
scopedKey ( Baum\Node $node ) : string Return a string-key for the current scoped attributes. Used for index computing when a scope is defined (acsts as an scope identifier).

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

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

Create a new \Baum\SetBuilder class instance.
public __construct ( Node $node ) : void
$node Node
Результат void

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

Return all children for the specified node.
public children ( Baum\Node $node ) : Illuminate\Database\Eloquent\Collection
$node Baum\Node
Результат Illuminate\Database\Eloquent\Collection

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

Return next index bound value for the given key (current scope identifier).
protected getNextBound ( string $key ) : integer
$key string
Результат integer

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

Get the fully qualified value for the specified column.
protected qualify ( $column ) : string
Результат string

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

Perform the re-calculation of the left and right indexes of the whole nested set tree structure.
public rebuild ( ) : void
Результат void

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

Recompute left and right index bounds for the specified node and its children (recursive call). Fill the depth column too.
public rebuildBounds ( $node, $depth )

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

Return all root nodes for the current database table appropiately sorted.
public roots ( ) : Illuminate\Database\Eloquent\Collection
Результат Illuminate\Database\Eloquent\Collection

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

Return an array of the scoped attributes of the supplied node.
protected scopedAttributes ( Baum\Node $node ) : array
$node Baum\Node
Результат array

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

Return a string-key for the current scoped attributes. Used for index computing when a scope is defined (acsts as an scope identifier).
protected scopedKey ( Baum\Node $node ) : string
$node Baum\Node
Результат string

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

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

Array which will hold temporary lft, rgt index values for each scope.
protected array $bounds
Результат array

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

Node instance for reference.
protected Node,Baum $node
Результат Node