當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。