public function getNew(string $id)
    {
        $definition = $this->raw($id);

        if (is_callable($definition)) {
            $service = call_user_func($definition, $this);
        } else {
            $service = $definition;
        }

        if (isset($this->extensionQueues[$id])) {
            $service = $this->extensionQueues[$id]->getService($service);
        }

        return $service;
    }
public function getNew(string $id)
    {
        $definition = $this->raw($id);

        if (is_callable($definition)) {
            $service = call_user_func($definition, $this);
        } else {
            $service = $definition;
        }

        if (isset($this->extensionQueues[$id])) {
            $service = $this->extensionQueues[$id]->getService($service);
        }

        return $service;
    }
public function getNew ( string $ id ) { $ definition = $ this -> raw ( $ id ) ; if ( is_callable ( $ definition ) ) { $ service = call_user_func ( $ definition , $ this ) ; } else { $ service = $ definition ; } if ( isset ( $ this -> extensionQueues [ $ id ] ) ) { $ service = $ this -> extensionQueues [ $ id ] -> getService ( $ service ) ; } return $ service ; }
Forces the container to return a new instance of the service.

@param string $id
@return mixed
@throws \InvalidArgumentException
Forces the container to return a new instance of the service .