From 8da6b3fa3cbaa9b1645e98ee7a7165c1e918d886 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 | 56 ++------------------------------------------- 1 file changed, 2 insertions(+), 54 deletions(-) diff --git a/Capsule/Manager.php b/Capsule/Manager.php index c2c503d3..8b939063 100644 --- a/Capsule/Manager.php +++ b/Capsule/Manager.php @@ -1,18 +1,13 @@ registerConnectors(); } - /** - * Setup the IoC container instance. - * - * @param \Illuminate\Container\Container $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 queue configuration options. * @@ -166,16 +145,6 @@ public function addConnection(array $config, $name = 'default') $this->container['config']["queue.connections.{$name}"] = $config; } - /** - * Make this capsule instance available globally. - * - * @return void - */ - public function setAsGlobal() - { - static::$instance = $this; - } - /** * Get the queue manager instance. * @@ -186,27 +155,6 @@ public function getQueueManager() return $this->manager; } - /** - * 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; - } - /** * Pass dynamic instance methods to the manager. *