当前位置: 首页>>代码示例>>PHP>>正文


PHP Env::executeAction方法代码示例

本文整理汇总了PHP中Env::executeAction方法的典型用法代码示例。如果您正苦于以下问题:PHP Env::executeAction方法的具体用法?PHP Env::executeAction怎么用?PHP Env::executeAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Env的用法示例。


在下文中一共展示了Env::executeAction方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: forward

 /**
  * Forward to specific controller / action
  *
  * @access public
  * @param string $action
  * @param string $controller. If this value is NULL current controller will be
  *   used
  * @return null
  */
 function forward($action, $controller = null)
 {
     return empty($controller) ? $this->execute($action) : Env::executeAction($controller, $action);
 }
开发者ID:469306621,项目名称:Languages,代码行数:13,代码来源:Controller.class.php

示例2: benchmark_timer_set_marker

    }
    // if
}
// try
// Init application
if (Env::isDebugging()) {
    benchmark_timer_set_marker('Init application');
}
// if
// We need to call application.php after the routing is executed because
// some of the application classes may need CONTROLLER, ACTION or $_GET
// data collected by the matched route
require_once 'application.php';
// Set handle request timer...
if (Env::isDebugging()) {
    benchmark_timer_set_marker('Handle request');
}
// if
// Get controller and action and execute...
try {
    Env::executeAction(request_controller(), request_action());
} catch (Exception $e) {
    if (Env::isDebugging()) {
        Env::dumpError($e);
    } else {
        Logger::log($e, Logger::FATAL);
        redirect_to(get_url('error', 'execute_action'));
    }
    // if
}
// try
开发者ID:ukd1,项目名称:Project-Pier,代码行数:31,代码来源:init.php

示例3: trace

        trace(__FILE__, 'FileRepository::setBackend() - use file storage');
        FileRepository::setBackend(new FileRepository_Backend_FileSystem(FILES_DIR));
    } else {
        trace(__FILE__, 'FileRepository::setBackend() - use mysql storage');
        FileRepository::setBackend(new FileRepository_Backend_MySQL(DB::connection()->getLink(), TABLE_PREFIX));
    }
    // if
    PublicFiles::setRepositoryPath(ROOT . '/public/files');
    if (trim(PUBLIC_FOLDER) == '') {
        PublicFiles::setRepositoryUrl(with_slash(ROOT_URL) . 'files');
    } else {
        PublicFiles::setRepositoryUrl(with_slash(ROOT_URL) . PUBLIC_FOLDER . '/files');
    }
    // if
    // Owner company or administrator doen't exist? Let the user create them
} catch (OwnerCompanyDnxError $e) {
    Env::executeAction('access', 'complete_installation');
} catch (AdministratorDnxError $e) {
    Env::executeAction('access', 'complete_installation');
    // Other type of error? We need to break here
} catch (Exception $e) {
    trace(__FILE__, '- catch ' . $e);
    if (Env::isDebugging()) {
        Env::dumpError($e);
    } else {
        Logger::log($e, Logger::FATAL);
        Env::executeAction('error', 'system');
    }
    // if
}
// if
开发者ID:bklein01,项目名称:Project-Pier,代码行数:31,代码来源:application.php

示例4: benchmark_timer_set_marker

    require_once LIBRARY_PATH . '/utf8/utf8.php';
}
// Set handle request timer...
if (Env::isDebugging()) {
    benchmark_timer_set_marker('Handle request');
}
// if
$url = urldecode($_SERVER['REQUEST_URI']);
if (preg_match('/<script[^>]*>.*(<\\/script>|$)/i', $url)) {
    Logger::log("Javascript injection from " . $_SERVER['REMOTE_ADDR'] . " in URL:" . $url);
    remove_scripts_and_redirect($url);
}
// Get controller and action and execute...
try {
    if (!defined('CONSOLE_MODE')) {
        Env::executeAction(request_controller(), request_action()) or DB::rollback();
    }
} catch (Exception $e) {
    if (Env::isDebugging()) {
        Logger::log($e, Logger::FATAL);
        Env::dumpError($e);
    } else {
        Logger::log($e, Logger::FATAL);
        redirect_to(get_url('error', 'execute_action'));
    }
    // if
}
// try
if (Env::isDebuggingTime()) {
    TimeIt::stop();
    $report = TimeIt::getTimeReportByType();
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:31,代码来源:init.php


注:本文中的Env::executeAction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。