本文整理汇总了PHP中Illuminate\Routing\Route::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Route::__construct方法的具体用法?PHP Route::__construct怎么用?PHP Route::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Routing\Route
的用法示例。
在下文中一共展示了Route::__construct方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($method, $uri, $action)
{
$this->uriStr = $uri;
$this->methodStr = $method;
$this->actionStr = $action;
parent::__construct($this->parseMethodStr($method), $this->parseUriStr($uri), $this->parseActionStr($action));
}
示例2: __construct
/**
* Create a new Route instance.
*
* @param array $methods
* @param string $uri
* @param \Closure|array $action
* @param $locale
*/
public function __construct($methods, $uri, $action, $locale)
{
$this->locale = $locale;
$this->baseUri = preg_replace('/\\b' . $locale . '\\b/', '%LOCALE%', $uri);
$uri = static::translateUri($uri, $locale);
if (array_key_exists('as', $action)) {
$action['as'] .= '.' . $locale;
}
parent::__construct($methods, $uri, $action);
}
示例3: __construct
/**
* Build a Route instance.
*
* @param array|string $methods
* @param string $uri
* @param mixed $action
*/
public function __construct($methods, $uri, $action)
{
parent::__construct($methods, $uri, $action);
$this->parameters = [];
/*
* Parse the WordPress condition together with the parameters
*/
$this->condition = $this->parseCondition($uri);
$this->conditionalParameters = $this->parseConditionalParameters($action);
/*
* Create a WordPress rewrite rule if the route is a non-WordPress route
*/
$this->createRewriteRule();
}
示例4: __construct
/**
* AlexaRoute constructor.
* @param array|string $methods
* @param string $uri
* @param string $intent
* @param \Closure|array $action
*/
public function __construct($methods, $uri, $intent, $action)
{
parent::__construct($methods, $uri, $action);
$this->routeIntent = $intent;
}
示例5: __construct
/**
* Override
*/
public function __construct($methods, $uri, $action)
{
parent::__construct($methods, $uri, $action);
$this->compileRoute();
}