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


PHP ActionController::run_after_filters方法代码示例

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


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

示例1: redirect_to

 static function redirect_to($url, $url_params = array(), $redirect_params = array())
 {
     # Running after-filters!
     ActionController::run_after_filters();
     if ($redirect_params) {
         self::parse_parameters($redirect_params);
     }
     $route = url_for($url, $url_params);
     header("Location: {$route}");
     exit;
 }
开发者ID:laiello,项目名称:my-imouto-booru,代码行数:11,代码来源:action_view.php

示例2: define

define('ACTVIEW', SYSROOT . 'action_view/');
require SYSROOT . 'system.php';
require SYSROOT . 'config/config.php';
require SYSROOT . 'config/config_system.php';
require SYSROOT . 'database/initialize.php';
require SYSROOT . 'load_functions.php';
require SYSROOT . 'request.php';
require SYSROOT . 'action_controller.php';
require ACTVIEW . 'action_view.php';
require SYSROOT . 'status_codes.php';
require SYSROOT . 'active_record.php';
require ROOT . 'config/config.php';
require ROOT . 'config/routes.php';
System::start();
/**
 * NOTE: in the case an action file needs to do "return;" (like post#show),
 * it must NOT return false, else it will be taken like the file wasn't found,
 * causing a missunderstanding.
 * (This also applies when including partials)
 * 
 * If an action returns an int, the system will exit with such HTTP status.
 */
$include = (include CTRLSPATH . Request::$controller . '/' . Request::$action . '.php');
if ($include === false) {
    ActionController::exit_with_error(500, 'Could not find action file.');
} elseif (is_int($include) && $include !== 1) {
    exit_with_status($include);
}
unset($include);
ActionController::run_after_filters();
include ACTVIEW . 'render.php';
开发者ID:laiello,项目名称:my-imouto-booru,代码行数:31,代码来源:initializer.php


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