Question PEAR::DB , Smarty, OOP
Posted: Wed Oct 13, 2004 2:27 am
Code: Select all
<?php
class smartyDB{
var $ooContainer;
var $ooResult;
var $ooRow;
function smartyDB(){
$this->Container = array();
$this->ooResult = NULL;
$this->ooRow = NULL;
}
function getMatrix($Sql, $dbHndl){
$this->ooResult = $dbHndl->query($Sql);
while($this->ooRow = $this->ooResult->fetchRow(DB_FETCHMODE_ASSOC)){
array_push($this->ooContainer, $this->ooRow);
}
}
function setMatrix($Name, $smartyObj){
$smartyObj->assign($Name, $this->ooContainer);
}
}
?>It is like, I have included
smarty.class.php
DB.php
in /Index.php
and the above code is in /classlib/smartydb.php
is it possible that one child class extends two parent or base classes?
some thing like
smarty extends DB and also extends Smarty