Source for file Interface.php
Documentation is available at Interface.php
* $Id: Interface.php 1080 2007-02-10 18:17:08Z romanb $
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
* Doctrine_Node_Interface
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @version $Revision: 1080 $
* @author Joe Simms <joe.simms@websites4.com>
* test if node has previous sibling
* test if node has next sibling
* test if node has children
* test if node has parent
* gets record of prev sibling or empty record
* @return object Doctrine_Record
* gets record of next sibling or empty record
* @return object Doctrine_Record
* @return array array of sibling Doctrine_Record objects
* gets record of first child or empty record
* @return object Doctrine_Record
* gets record of last child or empty record
* @return object Doctrine_Record
* gets children for node (direct descendants only)
* @return array array of sibling Doctrine_Record objects
* gets descendants for node (direct descendants only)
* @return iterator iterator to traverse descendants from node
* gets record of parent or empty record
* @return object Doctrine_Record
* gets ancestors for node
* @return object Doctrine_Collection
* gets path to node from root, uses record::toString() method to get node names
* @param string $seperator path seperator
* @param bool $includeNode whether or not to include node at end of path
* @return string string representation of path
public function getPath($seperator =
' > ', $includeNode =
false);
* gets level (depth) of node in the tree
* gets number of children (direct descendants)
* gets number of descendants (children and their children)
* inserts node as parent of dest record
* inserts node as previous sibling of dest record
* inserts node as next sibling of dest record
* inserts node as first child of dest record
* inserts node as first child of dest record
* moves node as prev sibling of dest record
* moves node as next sibling of dest record
* moves node as first child of dest record
* moves node as last child of dest record
* adds node as last child of record
public function addChild(Doctrine_Record $record);
* determines if node is leaf
* determines if node is root
* determines if node is equal to subject node
public function isEqualTo(Doctrine_Record $subj);
* determines if node is child of subject node
* determines if node is child of or sibling to subject node
* determines if node is valid
* deletes node and it's descendants