本文整理匯總了PHP中Illuminate\Contracts\Foundation\Application::setPluginsPath方法的典型用法代碼示例。如果您正苦於以下問題:PHP Application::setPluginsPath方法的具體用法?PHP Application::setPluginsPath怎麽用?PHP Application::setPluginsPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Contracts\Foundation\Application
的用法示例。
在下文中一共展示了Application::setPluginsPath方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: bootstrap
/**
* Specific features for OctoberCMS.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @return void
*/
public function bootstrap(Application $app)
{
/*
* Register singletons
*/
$app->singleton('string', function () {
return new \October\Rain\Support\Str();
});
/*
* Change paths based on config
*/
if ($pluginsPath = $app['config']->get('cms.pluginsPathLocal')) {
$app->setPluginsPath($pluginsPath);
}
if ($themesPath = $app['config']->get('cms.themesPathLocal')) {
$app->setThemesPath($themesPath);
}
/*
* Set execution context
*/
$requestPath = $this->normalizeUrl($app['request']->path());
$backendUri = $this->normalizeUrl($app['config']->get('cms.backendUri', 'backend'));
if (starts_with($requestPath, $backendUri)) {
$app->setExecutionContext('back-end');
} else {
$app->setExecutionContext('front-end');
}
}