cvs: pear /Tree/Dynamic DBnested.php

From: Date: Wed, 24 Apr 2002 23:53:14 +0000
Subject: cvs: pear /Tree/Dynamic DBnested.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3529@lists.php.net to get a copy of this message
cain Wed Apr 24 19:53:14 2002 EDT Modified files: /pear/Tree/Dynamic DBnested.php Log: - move common methods to common class Index: pear/Tree/Dynamic/DBnested.php diff -u pear/Tree/Dynamic/DBnested.php:1.5 pear/Tree/Dynamic/DBnested.php:1.6 --- pear/Tree/Dynamic/DBnested.php:1.5 Tue Apr 23 17:07:34 2002 +++ pear/Tree/Dynamic/DBnested.php Wed Apr 24 19:53:13 2002 @@ -16,7 +16,7 @@ // | Authors: | // +----------------------------------------------------------------------+ // -// $Id: DBnested.php,v 1.5 2002/04/23 21:07:34 cain Exp $ +// $Id: DBnested.php,v 1.6 2002/04/24 23:53:13 cain Exp $ require_once('Tree/Common.php'); require_once('Tree/Error.php'); @@ -620,87 +620,14 @@ - // - // PRIVATE METHODS - // - /** - * prepare multiple results - * - * @see _prepareResult() - * @access private - * @version 2002/03/03 - * @author Wolfram Kriesing <wolfram@kriesing.de> - * @param - * @return - */ - function _prepareResults( $results ) - { - $newResults = array(); - foreach( $results as $aResult ) - $newResults[] = $this->_prepareResult($aResult); - return $newResults; - } - /** - * map back the index names to get what is expected - * - * @access private - * @version 2002/03/03 - * @author Wolfram Kriesing <wolfram@kriesing.de> - * @param - * @return - */ - function _prepareResult( $result ) - { - $map = $this->getOption('columnNameMaps'); - if( $map ) - foreach( $map as $key=>$columnName ) - { - $result[$key] = $result[$columnName]; - unset($result[$columnName]); - } - return $result; - } - - /** - * - * - * @access private - * @version 2002/03/02 - * @author Wolfram Kriesing <wolfram@kriesing.de> - * @param - * @return - */ - function _throwError( $msg , $line , $mode=null ) - { - if( $mode===null && $this->debug>0 ) - $mode = PEAR_ERROR_PRINT; - return new Tree_Error( $msg , $line , __FILE__ , $mode , $this->dbh->last_query ); - } + // + // PRIVATE METHODS + // - /** - * this method retreives the real column name, as used in the DB - * since the internal names are fixed, to be portable between different - * DB-column namings, we map the internal name to the real column name here - * - * @access private - * @version 2002/03/02 - * @author Wolfram Kriesing <wolfram@kriesing.de> - * @param - * @return - */ - function _getColName( $internalName ) - { - if( $map = $this->getOption( 'columnNameMaps' ) ) - { - if( isset($map[$internalName]) ) - return $map[$internalName]; - } - return $internalName; - } /** * @@ -725,7 +652,7 @@ - // for playing .... + // for compatibility to Memory methods function getFirstRoot() { return $this->getRoot(); @@ -746,9 +673,6 @@ function &getNode( $startId=0 , $depth=0 ) { } - - - } ?>

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