/** * Render detailed diagnostics for unhandled exceptions rescued from * a controller action. */ public function rescueActionLocally($Exception) { $exception_class_name = get_class($Exception); if (!isset($this->rescue_templates[$exception_class_name])) { AkError::handle($Exception); } AkConfig::rebaseApp(AK_ACTION_PACK_DIR . DS . 'rescues'); $Template = new AkActionView(); $Template->registerTemplateHandler('tpl', 'AkPhpTemplateHandler'); $Template->Request = $this->Request; $file = $this->rescue_templates[$exception_class_name]; $body = $Template->render(array('file' => $file, 'layout' => 'layouts/exception', 'locals' => array('Exception' => $Exception, 'Template' => $Template, 'Request' => $this->Request))); AkConfig::leaveBase(); $this->render($this->getStatusCode($Exception), $body); }
static function leaveBase() { return AkConfig::rebaseApp(false); }
private function &_getControllerInstance() { $params = $this->getParams(); if ($rebase_path = AkConfig::getOption('rebase_path', false)) { AkConfig::rebaseApp($rebase_path); } $module_details = $this->_getModuleDetailsFromParams($params); $controller_details = $this->_getControllerDetailsFromParamsAndModuleDetails($params, $module_details); $this->_includeModuleSharedController($module_details); $this->_includeController($controller_details); $this->_ensureControllerClassExists($controller_details); $Controller = new $controller_details['class_name'](array('controller' => true)); $Controller->setModulePath($module_details['path']); $this->_linkSessionToController($Controller); return $Controller; }
<?php # This file is part of the Akelos Framework # (Copyright) 2004-2010 Bermi Ferrer bermi a t bermilabs com # See LICENSE and CREDITS for details $doc_db_file = AK_DOCS_DIR . DS . 'akelos' . DS . 'doc.sqlite'; $installed = file_exists($doc_db_file); $db = Ak::db('sqlite://' . urlencode($doc_db_file) . '/?persist'); AkConfig::rebaseApp(AK_PLUGINS_DIR . DS . 'doc_builder'); if (!$installed) { $DocInstaller = new DocInstaller($db); $DocInstaller->install(); } $SourceAnalyzer = new SourceAnalyzer(); $SourceAnalyzer->db = $db; $SourceAnalyzer->storeFilesForIndexing(AK_ACTION_MAILER_DIR); $SourceAnalyzer->indexFiles(); //unlink($doc_db_file); return; $dir_iterator = new RecursiveDirectoryIterator(AK_ACTION_MAILER_DIR); $iterator = new RecursiveIteratorIterator($dir_iterator, RecursiveIteratorIterator::SELF_FIRST); foreach ($iterator as $file) { if ($file->isFile()) { echo $file, "\n"; $original_file = file_get_contents($file); $Reflection = new AkReflectionFile($file); foreach ($Reflection->getClasses() as $Class) { echo 'class: ' . $Class->getName() . "\n"; $defined_methods = array('public' => array(), 'protected' => array(), 'private' => array()); foreach ($Class->getMethods() as $Method) { $name = $Method->getName();