本文整理汇总了PHP中AkConfig::rebaseApp方法的典型用法代码示例。如果您正苦于以下问题:PHP AkConfig::rebaseApp方法的具体用法?PHP AkConfig::rebaseApp怎么用?PHP AkConfig::rebaseApp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AkConfig
的用法示例。
在下文中一共展示了AkConfig::rebaseApp方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rescueActionLocally
/**
* 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);
}
示例2: leaveBase
static function leaveBase()
{
return AkConfig::rebaseApp(false);
}
示例3:
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;
}
示例4: file_exists
<?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();