protected function pop($id, $args = array())
    {
        if (array_key_exists($id, $this->services)) {
            return $this->services[$id];
        }

        if (array_key_exists($id, $this->callables)) {
            $callback = $this->callables[$id];

            return call_user_func_array($callback, array_merge(array($this), $args));
        }

        throw new \Exception("The dependency with id of ({$id}) is missing.");
    }
protected function pop($id, $args = array())
    {
        if (array_key_exists($id, $this->services)) {
            return $this->services[$id];
        }

        if (array_key_exists($id, $this->callables)) {
            $callback = $this->callables[$id];

            return call_user_func_array($callback, array_merge(array($this), $args));
        }

        throw new \Exception("The dependency with id of ({$id}) is missing.");
    }
protected function pop ( $ id , $ args = array ( ) ) { if ( array_key_exists ( $ id , $ this -> services ) ) { return $ this -> services [ $ id ] ; } if ( array_key_exists ( $ id , $ this -> callables ) ) { $ callback = $ this -> callables [ $ id ] ; return call_user_func_array ( $ callback , array_merge ( array ( $ this ) , $ args ) ) ; } throw new \ Exception ( "The dependency with id of ({$id}) is missing." ) ; }
Pops a dependency out of the container

@param string $id
@param array  $args

@throws \Exception

@return mixed
Pops a dependency out of the container