本文整理汇总了PHP中Illuminate\View\Factory::setFinder方法的典型用法代码示例。如果您正苦于以下问题:PHP Factory::setFinder方法的具体用法?PHP Factory::setFinder怎么用?PHP Factory::setFinder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\View\Factory
的用法示例。
在下文中一共展示了Factory::setFinder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Setup default view finder and view paths.
*
* @param Container $app
*/
public function __construct(Container $app)
{
// Default themes path
$this->basePath = config('theme.path');
// Config view finder
$paths = $app['config']['view.paths'];
$this->view = $app->make('view');
$this->view->setFinder(new ThemeViewFinder($app['files'], (array) $paths));
// Scan themes
$this->scanThemes();
}
示例2: setFinder
/**
* Set the view finder instance.
*
* @param \Illuminate\View\ViewFinderInterface $finder
* @return void
* @static
*/
public static function setFinder($finder)
{
\Illuminate\View\Factory::setFinder($finder);
}
示例3: registerPathsInFinder
/**
* Registers the view paths by creating a new array and injecting a new FileViewFinder
*
* @param Factory $view
* @param FileViewFinder $finder
* @param TenantParticipant $tenant
*
* @return array
*/
protected function registerPathsInFinder(Factory $view, FileViewFinder $finder, TenantParticipant $tenant)
{
$paths = [];
$this->addPathToViewPaths($paths, $tenant->getDomain());
$this->addPathToViewPaths($paths, $tenant->getTenantOwner()->getDomain());
$paths = array_merge($paths, $finder->getPaths());
$finder = $this->createViewFinder($finder, $paths);
// replace ViewFinder in ViewManager with new instance with ordered paths
$view->setFinder($finder);
return $paths;
}