PHP 클래스 Baum\SetBuilder

파일 보기 프로젝트 열기: gazsp/baum 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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