public function get($className, array $parameters = [])
    {
        if ($this->injectSelf($className)) {
            return $this;
        }

        $parameterKey = $this->getParameterStoreKey($parameters);

        $className = $this->resolve($className);

        if (!isset($this->services[$className][$parameterKey])) {
            $this->services[$className][$parameterKey] = $this->create($className, $parameters);
        }

        return $this->services[$className][$parameterKey];
    }
public function get($className, array $parameters = [])
    {
        if ($this->injectSelf($className)) {
            return $this;
        }

        $parameterKey = $this->getParameterStoreKey($parameters);

        $className = $this->resolve($className);

        if (!isset($this->services[$className][$parameterKey])) {
            $this->services[$className][$parameterKey] = $this->create($className, $parameters);
        }

        return $this->services[$className][$parameterKey];
    }
public function get ( $ className , array $ parameters = [ ] ) { if ( $ this -> injectSelf ( $ className ) ) { return $ this ; } $ parameterKey = $ this -> getParameterStoreKey ( $ parameters ) ; $ className = $ this -> resolve ( $ className ) ; if ( ! isset ( $ this -> services [ $ className ] [ $ parameterKey ] ) ) { $ this -> services [ $ className ] [ $ parameterKey ] = $ this -> create ( $ className , $ parameters ) ; } return $ this -> services [ $ className ] [ $ parameterKey ] ; }
Fetch a service with supplied parameters.
This method will call create for a new service and store them for later use.

@param string $className
@param array $parameters
@return object
@throws RuntimeException
Fetch a service with supplied parameters . This method will call create for a new service and store them for later use .