本文整理匯總了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;
}