diff --git a/src/Illuminate/Session/SessionManager.php b/src/Illuminate/Session/SessionManager.php index f68fa143b869..01112f01ecbf 100755 --- a/src/Illuminate/Session/SessionManager.php +++ b/src/Illuminate/Session/SessionManager.php @@ -38,7 +38,7 @@ protected function createNullDriver() protected function createArrayDriver() { return $this->buildSession(new ArraySessionHandler( - $this->container['config']->get('session.lifetime') + $this->config->get('session.lifetime') )); } @@ -51,8 +51,8 @@ protected function createCookieDriver() { return $this->buildSession(new CookieSessionHandler( $this->container->make('cookie'), - $this->container['config']->get('session.lifetime'), - $this->container['config']->get('session.expire_on_close') + $this->config->get('session.lifetime'), + $this->config->get('session.expire_on_close') )); } @@ -73,10 +73,10 @@ protected function createFileDriver() */ protected function createNativeDriver() { - $lifetime = $this->container['config']->get('session.lifetime'); + $lifetime = $this->config->get('session.lifetime'); return $this->buildSession(new FileSessionHandler( - $this->container->make('files'), $this->container['config']->get('session.files'), $lifetime + $this->container->make('files'), $this->config->get('session.files'), $lifetime )); } @@ -87,9 +87,9 @@ protected function createNativeDriver() */ protected function createDatabaseDriver() { - $table = $this->container['config']->get('session.table'); + $table = $this->config->get('session.table'); - $lifetime = $this->container['config']->get('session.lifetime'); + $lifetime = $this->config->get('session.lifetime'); return $this->buildSession(new DatabaseSessionHandler( $this->getDatabaseConnection(), $table, $lifetime, $this->container @@ -103,7 +103,7 @@ protected function createDatabaseDriver() */ protected function getDatabaseConnection() { - $connection = $this->container['config']->get('session.connection'); + $connection = $this->config->get('session.connection'); return $this->container->make('db')->connection($connection); } @@ -138,7 +138,7 @@ protected function createRedisDriver() $handler = $this->createCacheHandler('redis'); $handler->getCache()->getStore()->setConnection( - $this->container['config']->get('session.connection') + $this->config->get('session.connection') ); return $this->buildSession($handler); @@ -173,11 +173,11 @@ protected function createCacheBased($driver) */ protected function createCacheHandler($driver) { - $store = $this->container['config']->get('session.store') ?: $driver; + $store = $this->config->get('session.store') ?: $driver; return new CacheBasedSessionHandler( clone $this->container->make('cache')->store($store), - $this->container['config']->get('session.lifetime') + $this->config->get('session.lifetime') ); } @@ -189,13 +189,13 @@ protected function createCacheHandler($driver) */ protected function buildSession($handler) { - return $this->container['config']->get('session.encrypt') + return $this->config->get('session.encrypt') ? $this->buildEncryptedSession($handler) : new Store( - $this->container['config']->get('session.cookie'), + $this->config->get('session.cookie'), $handler, $id = null, - $this->container['config']->get('session.serialization', 'php') + $this->config->get('session.serialization', 'php') ); } @@ -208,11 +208,11 @@ protected function buildSession($handler) protected function buildEncryptedSession($handler) { return new EncryptedStore( - $this->container['config']->get('session.cookie'), + $this->config->get('session.cookie'), $handler, $this->container['encrypter'], $id = null, - $this->container['config']->get('session.serialization', 'php'), + $this->config->get('session.serialization', 'php'), ); } @@ -223,7 +223,7 @@ protected function buildEncryptedSession($handler) */ public function shouldBlock() { - return $this->container['config']->get('session.block', false); + return $this->config->get('session.block', false); } /** @@ -233,7 +233,7 @@ public function shouldBlock() */ public function blockDriver() { - return $this->container['config']->get('session.block_store'); + return $this->config->get('session.block_store'); } /** @@ -243,7 +243,7 @@ public function blockDriver() */ public function getSessionConfig() { - return $this->container['config']->get('session'); + return $this->config->get('session'); } /** @@ -253,7 +253,7 @@ public function getSessionConfig() */ public function getDefaultDriver() { - return $this->container['config']->get('session.driver'); + return $this->config->get('session.driver'); } /** @@ -264,6 +264,6 @@ public function getDefaultDriver() */ public function setDefaultDriver($name) { - $this->container['config']->set('session.driver', $name); + $this->config->set('session.driver', $name); } }