protected function getChild($child, $args = array()) { $action = new \Core\Action($child, $args); if (file_exists($action->getFile())) { require_once __modification($action->getFile()); $class = $action->getClass(); $controller = new $class(); $controller->{$action->getMethod()}($action->getArgs()); return $controller->getOutput(); } else { return ''; } }
/** * Test whether or not the Action has a specific action * @param string $child * @param array $args * @return boolean */ protected function hasAction($child, $args = array()) { $action = new \Core\Action($child, $args); if (file_exists($action->getFile())) { require_once __modification($action->getFile()); $class = $action->getClass(); $controller = new $class(); if (method_exists($controller, $action->getMethod())) { return true; } else { return false; } } else { return false; } }