SelvinOrtiz\Zit\Zit::pop PHP Method

pop() protected method

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