From 214c66214875d1c7650ca0adb94862e731b816d9 Mon Sep 17 00:00:00 2001 From: crynobone Date: Tue, 15 Jul 2014 13:57:19 +0800 Subject: [PATCH] Move common method for a CapsuleManager to trait, this would reduce the requirement to produce new CapsuleManager for other component in the future (e.g: laravel/framework#5032) Also remove duplicate "require-dev" component (when already explicitly declare in "require"). Signed-off-by: crynobone --- Capsule/Manager.php | 63 ++------------------------------------------- composer.json | 3 +-- 2 files changed, 3 insertions(+), 63 deletions(-) diff --git a/Capsule/Manager.php b/Capsule/Manager.php index 6283e3004..7cc277395 100755 --- a/Capsule/Manager.php +++ b/Capsule/Manager.php @@ -1,22 +1,17 @@ setupManager(); } - /** - * Setup the IoC container instance. - * - * @param \Illuminate\Container\Container|null $container - * @return void - */ - protected function setupContainer($container) - { - $this->container = $container ?: new Container; - - if ( ! $this->container->bound('config')) - { - $this->container->instance('config', new Fluent); - } - } - /** * Setup the default database configuration options. * @@ -182,16 +154,6 @@ public function setFetchMode($fetchMode) return $this; } - /** - * Make this capsule instance available globally. - * - * @return void - */ - public function setAsGlobal() - { - static::$instance = $this; - } - /** * Get the database manager instance. * @@ -250,27 +212,6 @@ public function setCacheManager(CacheManager $cache) $this->container->instance('cache', $cache); } - /** - * Get the IoC container instance. - * - * @return \Illuminate\Container\Container - */ - public function getContainer() - { - return $this->container; - } - - /** - * Set the IoC container instance. - * - * @param \Illuminate\Container\Container $container - * @return void - */ - public function setContainer(Container $container) - { - $this->container = $container; - } - /** * Dynamically pass methods to the default connection. * diff --git a/composer.json b/composer.json index fa4bd4b19..1c284c01b 100755 --- a/composer.json +++ b/composer.json @@ -19,8 +19,7 @@ "illuminate/cache": "4.2.*", "illuminate/console": "4.2.*", "illuminate/filesystem": "4.2.*", - "illuminate/pagination": "4.2.*", - "illuminate/support": "4.2.*" + "illuminate/pagination": "4.2.*" }, "autoload": { "psr-0": {