本文整理汇总了PHP中Illuminate\Contracts\Foundation\Application::resolving方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::resolving方法的具体用法?PHP Application::resolving怎么用?PHP Application::resolving使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Contracts\Foundation\Application
的用法示例。
在下文中一共展示了Application::resolving方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: extendCache
/**
* Add the aerospike driver to the cache manager.
*
* @param \Illuminate\Contracts\Foundation\Application $app
*/
public function extendCache(Application $app)
{
$app->resolving('cache', function (CacheManager $cache) {
$cache->extend('aerospike', function ($app) {
return $app['aerospike.store'];
});
});
}
示例2: setThemeResolver
/**
* Boot theme resolver.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @param \Orchestra\Contracts\Theme\Theme $theme
*
* @return void
*/
protected function setThemeResolver(Application $app, Theme $theme)
{
// The theme is only booted when the first view is being composed.
// This would prevent multiple theme being booted in the same
// request.
if ($app->resolved('view')) {
$theme->resolving();
} else {
$app->resolving('view', function () use($theme) {
$theme->resolving();
});
}
}
示例3: extendSession
/**
* Add the memcache driver to the session manager.
*
* @param \Illuminate\Contracts\Foundation\Application $app
*/
public function extendSession(Application $app)
{
$app->resolving('session', function (SessionManager $session) {
$session->extend('memcache', function ($app) {
return $app['memcache.driver'];
});
});
}