/** * routing */ public function route() { if (file_exists($file = WWWROOT . "Lib/Action/class.{$this->_controller}Action" . EXT)) { require_once RECHO_PHP . "Lib/Action/class.RcAction.php"; require_once $file; if (class_exists($this->_controller . 'Action')) { $recho = new ReflectionClass($this->_controller . 'Action'); if ($recho->hasMethod($this->_action)) { $rc = $recho->getMethod($this->_action); $fuc = $recho->newInstance(); $rc->invoke($fuc); return true; } } } elseif (file_exists($file = RECHO_PHP . "Lib/Action/class.{$this->_controller}Action" . EXT)) { require_once RECHO_PHP . "Lib/Action/class.RcAction.php"; require_once $file; if (class_exists($this->_controller . 'Action')) { $recho = new ReflectionClass($this->_controller . 'Action'); if ($recho->hasMethod($this->_action)) { $rc = $recho->getMethod($this->_action); $fuc = $recho->newInstance(); $rc->invoke($fuc); return true; } } } rc::debug()->error('404'); }