$toolbox
$toolbox : \RedBeanPHP\ToolBox
Tree
Given a bean, finds it children or parents in a hierarchical structure.
$toolbox : \RedBeanPHP\ToolBox
$writer : \RedBeanPHP\QueryWriter
$oodb : \RedBeanPHP\OODB
__construct(\RedBeanPHP\ToolBox $toolbox)
Constructor, creates a new instance of the Tree.
\RedBeanPHP\ToolBox | $toolbox | toolbox |
children(\RedBeanPHP\OODBBean $bean, string|NULL $sql = NULL, array $bindings = array()) : array
Returns all child beans associates with the specified bean in a tree structure.
\RedBeanPHP\OODBBean | $bean | reference bean to find children of |
string|NULL | $sql | optional SQL snippet |
array | $bindings | optional parameter bindings for SQL snippet |
parents(\RedBeanPHP\OODBBean $bean, string|NULL $sql = NULL, array $bindings = array()) : array
Returns all parent beans associates with the specified bean in a tree structure.
\RedBeanPHP\OODBBean | $bean | reference bean to find parents of |
string|NULL | $sql | optional SQL snippet |
array | $bindings | optional parameter bindings for SQL snippet |
countChildren(\RedBeanPHP\OODBBean $bean, string|NULL $sql = NULL, array $bindings = array(), string|boolean $select = TRUE) : integer
Counts all children beans associates with the specified bean in a tree structure.
\RedBeanPHP\OODBBean | $bean | reference bean to find children of |
string|NULL | $sql | optional SQL snippet |
array | $bindings | optional parameter bindings for SQL snippet |
string|boolean | $select | select snippet to use (advanced, optional, see QueryWriter::queryRecursiveCommonTableExpression) |
countParents(\RedBeanPHP\OODBBean $bean, string|NULL $sql = NULL, array $bindings = array(), string|boolean $select = TRUE) : integer
Counts all parent beans associates with the specified bean in a tree structure.
\RedBeanPHP\OODBBean | $bean | reference bean to find parents of |
string|NULL | $sql | optional SQL snippet |
array | $bindings | optional parameter bindings for SQL snippet |
string|boolean | $select | select snippet to use (advanced, optional, see QueryWriter::queryRecursiveCommonTableExpression) |