本文整理汇总了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;
}