La classe "post" esiste, la funzione "viewall" nella classe post esiste ma stampa "404".
Codice PHP:
if(method_exists($this->_app, $this->_action)){
extract($this->_argument, EXTR_PREFIX_SAME, "argument");
//call_user_func_array(array($this->_app, $this->_action), $this->_argument);
call_user_func_array(array(new $this->_app, $this->_action), $this->_argument);
//require_once ROOT.DS.'app'.DS.$this->_app.DS.$this->_action.'.php';
}else{
echo "404";
}
-------------------------------------
Se faccio cosi
Codice PHP:
if(method_exists($this->_app, $this->_action)){
echo "esiste";
}else{
echo "non esiste";
}
mi stampa esiste. Se aggiungo il call_user_func_array() mi stampa 404.
Perchè!?!?!!