\RedBeanPHP\UtilTree

Tree

Given a bean, finds it children or parents in a hierchical structure.

Summary

Methods
Properties
Constants
__construct()
children()
parents()
No public properties found
No constants found
No protected methods found
$toolbox
$writer
$oodb
N/A
No private methods found
No private properties found
N/A

Properties

$writer

$writer : \RedBeanPHP\Util\QueryWriter

Type

\RedBeanPHP\Util\QueryWriter

$oodb

$oodb : \RedBeanPHP\Util\OODB

Type

\RedBeanPHP\Util\OODB

Methods

__construct()

__construct(\RedBeanPHP\ToolBox  $toolbox) 

Constructor, creates a new instance of the Tree.

Parameters

\RedBeanPHP\ToolBox $toolbox

toolbox

children()

children(\RedBeanPHP\OODBBean  $bean, string  $sql = NULL, array  $bindings = array()) : array

Returns all child beans associates with the specified bean in a tree structure.

Parameters

\RedBeanPHP\OODBBean $bean

reference bean to find children of

string $sql

optional SQL snippet

array $bindings

optional parameter bindings for SQL snippet

Returns

array

parents()

parents(\RedBeanPHP\OODBBean  $bean, string  $sql = NULL, array  $bindings = array()) : array

Returns all parent beans associates with the specified bean in a tree structure.

Parameters

\RedBeanPHP\OODBBean $bean

reference bean to find parents of

string $sql

optional SQL snippet

array $bindings

optional parameter bindings for SQL snippet

Returns

array