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


PHP Route::parseFilters方法代码示例

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


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

示例1: patternsByMethod

 /**
  * Filter pattern filters that don't apply to the request verb.
  *
  * @param  string  $method
  * @param  array   $filters
  * @return array
  */
 protected function patternsByMethod($method, $filters)
 {
     $results = array();
     foreach ($filters as $filter) {
         // The idea here is to check and see if the pattern filter applies to this HTTP
         // request based on the request methods. Pattern filters might be limited by
         // the request verb to make it simply to assign to the given verb at once.
         if ($this->filterSupportsMethod($filter, $method)) {
             $parsed = Route::parseFilters($filter['name']);
             $results = array_merge($results, $parsed);
         }
     }
     return $results;
 }
开发者ID:hramose,项目名称:Sistema-Control-de-Almacen,代码行数:21,代码来源:Router.php

示例2: callAfterFilters

 /**
  * Calls 'after' filters, if any supplied
  *
  * @param  Illuminate\Http\Response $response
  * @return Illuminate\Http\Response
  */
 private function callAfterFilters($response)
 {
     // Only if there exists a route AND after filters, we will apply the after
     // filter. Why? Because if there's no matching route, then, the after
     // filter will squak out as we'll be missing the 'route' parameter
     // that it needs.
     if (($route = Router::getCurrentRoute()) && !is_null($after = Config::get('hive::response.after'))) {
         $afterFilters = Route::parseFilters($after);
         foreach ($afterFilters as $filter => $parameters) {
             Router::callRouteFilter($filter, $parameters, $route, Router::getCurrentRequest(), $response);
         }
     }
     return $response;
 }
开发者ID:owlgrin,项目名称:hive,代码行数:20,代码来源:Responses.php


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