cvs: pear /Tree Common.php

From: Date: Sat, 04 May 2002 19:18:53 +0000
Subject: cvs: pear /Tree Common.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3697@lists.php.net to get a copy of this message
cain Sat May 4 15:18:53 2002 EDT Modified files: /pear/Tree Common.php Log: - added isChildOf Index: pear/Tree/Common.php diff -u pear/Tree/Common.php:1.6 pear/Tree/Common.php:1.7 --- pear/Tree/Common.php:1.6 Wed Apr 24 19:53:35 2002 +++ pear/Tree/Common.php Sat May 4 15:18:52 2002 @@ -16,7 +16,7 @@ // | Authors: Wolfram Kriesing <wolfram@kriesing.de> | // +----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.6 2002/04/24 23:53:35 cain Exp $ +// $Id: Common.php,v 1.7 2002/05/04 19:18:52 cain Exp $ require_once('Tree/OptionsDB.php'); @@ -199,9 +199,12 @@ - # - # abstract methods, those should be overwritten by the implementing class - # + + + // + // abstract methods, those should be overwritten by the implementing class + // + /** * gets the path to the element given by its id @@ -216,6 +219,7 @@ */ function getPath( $id ) { + return $this->_throwError( 'not implemented, at least not overwritten the abstract declaration' , __LINE__ ); } // end of function /** @@ -230,6 +234,24 @@ */ function getLevel( $id ) { + return $this->_throwError( 'not implemented, at least not overwritten the abstract declaration' , __LINE__ ); + } // end of function + + /** + * returns if $childId is a child of $id + * + * @abstract + * @version 2002/04/29 + * @access public + * @author Wolfram Kriesing <wolfram@kriesing.de> + * @param int id of the element + * @param int id of the element to check if it is a child + * @param boolean if this is true the entire tree below is checked + * @return boolean true if it is a child + */ + function isChildOf( $id , $childId , $checkAll=true ) + { + return $this->_throwError( 'not implemented, at least not overwritten the abstract declaration' , __LINE__ ); } // end of function @@ -318,9 +340,6 @@ $mode = PEAR_ERROR_PRINT; return new Tree_Error( $msg , $line , __FILE__ , $mode , $this->dbh->last_query ); } - - - } ?>

« previous php.pear.cvs (#3697) next »