Funktioniert leider nicht, vieleicht ist das ein Bug!?
class rpDBM{
private static $dbStruct = null;
private static $dbRels = null;
function connect(){
if( connect_zur_db() ) } else {
$return = false;
}
} else {
$return = false;
}
if($return){
$this->get_dbStruct(); // hier
$this->get_dbRels();
} else {
}
return $return;
}
private function init_dbStruct(){
echo "halllllllloooo" // wird zweimal ausgegeben!!
code...
$this->dbStruct = $struct;
return $struct;
}
private function init_dbRels(){
code...
$this->dbRels = $rels;
return $rels;
}
}
class rpDBM_relations extends rpDBM{
function check($display){
$this->checkNoField($display);
$this->checkNoPair($display);
$this->checkDouble($display);
}
function checkNoField($display = true){
$struct = $this->get_dbStruct(); // hier
foreach($struct AS $table => $fields){
foreach($fields AS $field => $f_opt){
echo $table.'<br />';
echo $field.'<br />';
}
}
// $this->query();
}
}
mfg
Tobias Buschor