本文整理汇总了PHP中Illuminate\Routing\UrlGenerator::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP UrlGenerator::__construct方法的具体用法?PHP UrlGenerator::__construct怎么用?PHP UrlGenerator::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Routing\UrlGenerator
的用法示例。
在下文中一共展示了UrlGenerator::__construct方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Create a new UrlGenerator instance.
*
* @param RouteCollection $routes
* @param Request $request
*/
public function __construct(RouteCollection $routes, Request $request)
{
parent::__construct(app('router')->getRoutes(), $request);
$this->parser = app(Engine::class);
if (defined('LOCALE')) {
$this->forceRootUrl($this->getRootUrl($this->getScheme(null)) . '/' . LOCALE);
}
}
示例2: __construct
/**
* Create a new URL Generator instance.
*
* @param \Illuminate\Routing\RouteCollection $routes
* @param \Illuminate\Http\Request $request
* @return void
*/
public function __construct(RouteCollection $routes, Request $request)
{
parent::__construct($routes, $request);
if (\Cache::has('assets-cdn::commitID')) {
$this->commitID = \Cache::get('assets-cdn::commitID');
} else {
$this->commitID = exec('git rev-parse HEAD');
\Cache::forever('assets-cdn::commitID', $this->commitID);
}
$this->cdnURL = config('assets-cdn.cdn-url');
}
示例3: __construct
/**
* Create a new URL Generator instance.
*
* @param \Illuminate\Routing\RouteCollection $routes
* @param \Illuminate\Http\Request $request
* @return void
*/
public function __construct(RouteCollection $routes, Request $request, TenantManager $tenantManager)
{
parent::__construct($routes, $request);
$this->tenantManager = $tenantManager;
}
示例4: __construct
/**
* Create a new URL Generator instance.
*
* @param \Illuminate\Routing\RouteCollection $routes
* @param \Illuminate\Http\Request $request
* @param \Translator\Localizer $localizer
* @return void
*/
public function __construct(RouteCollection $routes, Request $request, Localizer $localizer)
{
parent::__construct($routes, $request);
$this->localizer = $localizer;
}
示例5: __construct
public function __construct(RouteCollection $routes, Request $request)
{
parent::__construct($routes, $request);
// force the generator to use https
$this->forceSchema('https');
}
示例6: __construct
/**
* Create a new URL Generator instance.
*
* @param \Illuminate\Routing\RouteCollection $routes
* @param \Illuminate\Http\Request $request
* @param Theme $theme
*/
public function __construct(RouteCollection $routes, Request $request, Theme $theme)
{
$this->theme = $theme;
parent::__construct($routes, $request);
}
示例7: __construct
/**
* Constructor.
*
* @param RouteCollection $routes
* @param Request $request
* @param TenantContract $tenant
*/
public function __construct(RouteCollection $routes, Request $request, TenantContract $tenant)
{
parent::__construct($routes, $request);
$this->tenant = $tenant;
}
示例8: __construct
public function __construct(RouteCollection $routes, Request $request, AssetManifest $manifest)
{
parent::__construct($routes, $request);
$this->manifest = $manifest;
}