class Doctrine_Node implements IteratorAggregate (View source)

Doctrine_Node

Properties

protected $record
protected $options
protected $iteratorType
protected $iteratorOptions
protected unknown_type $_tree The tree to which the node belongs.

Methods

__construct(Doctrine_Record $record, array $options)

contructor, creates node with reference to record and any options

static Doctrine_Node
factory(Doctrine_Record $record, string $implName, array $options = array())

Factory method for creating a Node.

setRecord(Doctrine_Record $record)

setter for record attribute

getRecord()

getter for record attribute

traverse(string $type = 'Pre', array $options = array())

convenience function for getIterator

getIterator(string $type = null, array $options = null)

get iterator

setIteratorType(int $type)

sets node's iterator type

setIteratorOptions(int $options)

sets node's iterator options

Details

__construct(Doctrine_Record $record, array $options)

contructor, creates node with reference to record and any options

Parameters

Doctrine_Record $record instance of Doctrine_Record
array $options options

static Doctrine_Node factory(Doctrine_Record $record, string $implName, array $options = array())

Factory method for creating a Node.

This is a factory method that returns node instance based upon chosen implementation.

Parameters

Doctrine_Record $record instance of Doctrine_Record
string $implName implementation (NestedSet, AdjacencyList, MaterializedPath)
array $options options

Return Value

Doctrine_Node

Exceptions

Doctrine_Node_Exception if $implName is not a valid class

setRecord(Doctrine_Record $record)

setter for record attribute

Parameters

Doctrine_Record $record instance of Doctrine_Record

Doctrine_Record getRecord()

getter for record attribute

Return Value

Doctrine_Record

traverse(string $type = 'Pre', array $options = array())

convenience function for getIterator

Parameters

string $type type of iterator (Pre | Post | Level)
array $options options

getIterator(string $type = null, array $options = null)

get iterator

Parameters

string $type type of iterator (Pre | Post | Level)
array $options options

setIteratorType(int $type)

sets node's iterator type

Parameters

int $type

setIteratorOptions(int $options)

sets node's iterator options

Parameters

int $options