/**
  * 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'];
         });
     });
 }
Example #2
0
 /**
  * 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();
         });
     }
 }
 /**
  * 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'];
         });
     });
 }