src/Container.php
public function addProvider($provider)
    {
        if (is_string($provider)) {
            $provider = new $provider($this);
        }

        // Only allow a service provider to be registered
        // once.
        if (in_array($provider, $this->providers)) {
            return;
        }

        $this->providers[] = $provider;

        $this->registerEvents($provider);
        $this->registerProvides($provider);

        $this->registerProvider($provider);
    }
public function addProvider($provider)
    {
        if (is_string($provider)) {
            $provider = new $provider($this);
        }

        // Only allow a service provider to be registered
        // once.
        if (in_array($provider, $this->providers)) {
            return;
        }

        $this->providers[] = $provider;

        $this->registerEvents($provider);
        $this->registerProvides($provider);

        $this->registerProvider($provider);
    }
public function addProvider ( $ provider ) { if ( is_string ( $ provider ) ) { $ provider = new $ provider ( $ this ) ; } // Only allow a service provider to be registered // once. if ( in_array ( $ provider , $ this -> providers ) ) { return ; } $ this -> providers [ ] = $ provider ; $ this -> registerEvents ( $ provider ) ; $ this -> registerProvides ( $ provider ) ; $ this -> registerProvider ( $ provider ) ; }
Add a service provider to the application.

@param mixed $provider
@return void
Add a service provider to the application .