本文整理匯總了PHP中Illuminate\Routing\Router::findPatternFilters方法的典型用法代碼示例。如果您正苦於以下問題:PHP Router::findPatternFilters方法的具體用法?PHP Router::findPatternFilters怎麽用?PHP Router::findPatternFilters使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Routing\Router
的用法示例。
在下文中一共展示了Router::findPatternFilters方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getPatternFilters
/**
* Get all of the pattern filters matching the route.
*
* @param \Illuminate\Routing\Route $route
* @return array
*/
protected function getPatternFilters($route)
{
$patterns = array();
foreach ($route->getMethods() as $method) {
$inner = $this->router->findPatternFilters($method, $route->getPath());
$patterns = array_merge($patterns, $inner);
}
return $patterns;
}
示例2: findPatternFilters
/**
* Find the patterned filters matching a request.
*
* @param \Illuminate\Http\Request $request
* @return array
* @deprecated since version 5.1.
* @static
*/
public static function findPatternFilters($request)
{
return \Illuminate\Routing\Router::findPatternFilters($request);
}
示例3: getMethodPatterns
/**
* Get the pattern filters for a given URI and method.
*
* @param string $uri
* @param string $method
* @return array
*/
protected function getMethodPatterns($uri, $method)
{
return $this->router->findPatternFilters(Request::create($uri, $method));
}
示例4: getAllBeforeFilters
/**
* Get all of the before filters to run on the route.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* @return array
*/
protected function getAllBeforeFilters(Request $request)
{
$before = $this->getBeforeFilters();
return array_merge($before, $this->router->findPatternFilters($request));
}
示例5: getAllBeforeFilters
/**
* Get all of the before filters to run on the route.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* @return array
*/
protected function getAllBeforeFilters(Request $request)
{
$before = $this->getBeforeFilters();
$patterns = $this->router->findPatternFilters($request->getMethod(), $request->getPathInfo());
return array_merge($before, $patterns);
}
示例6: findPatternFilters
/**
* Find the patterned filters matching a request.
*
* @param string $method
* @param string $path
* @return array
*/
public function findPatternFilters($method, $path)
{
$filters = parent::findPatternFilters($method, $path);
foreach ($this->httpVerbFilters as $verb => $values) {
if ($verb == strtolower($method)) {
$filters = array_merge($filters, $values);
}
}
return $filters;
}