public function get($name, $parameters = null)
    {
        if (isset($this->_instances[$name])) {
            return $this->_instances[$name];
        }

        if (isset($this->_definitions[$name])) {
            $definition = $this->_definitions[$name];
        } else {
            return $this->getInstance($name, $parameters, $name);
        }

        $instance = $this->getInstance($definition, $parameters, $name);

        if (is_string($definition) || !isset($definition['shared']) || $definition['shared'] === true) {
            $this->_instances[$name] = $instance;
        }

        return $instance;
    }
public function get($name, $parameters = null)
    {
        if (isset($this->_instances[$name])) {
            return $this->_instances[$name];
        }

        if (isset($this->_definitions[$name])) {
            $definition = $this->_definitions[$name];
        } else {
            return $this->getInstance($name, $parameters, $name);
        }

        $instance = $this->getInstance($definition, $parameters, $name);

        if (is_string($definition) || !isset($definition['shared']) || $definition['shared'] === true) {
            $this->_instances[$name] = $instance;
        }

        return $instance;
    }
public function get ( $ name , $ parameters = null ) { if ( isset ( $ this -> _instances [ $ name ] ) ) { return $ this -> _instances [ $ name ] ; } if ( isset ( $ this -> _definitions [ $ name ] ) ) { $ definition = $ this -> _definitions [ $ name ] ; } else { return $ this -> getInstance ( $ name , $ parameters , $ name ) ; } $ instance = $ this -> getInstance ( $ definition , $ parameters , $ name ) ; if ( is_string ( $ definition ) || ! isset ( $ definition [ 'shared' ] ) || $ definition [ 'shared' ] === true ) { $ this -> _instances [ $ name ] = $ instance ; } return $ instance ; }
Resolves the component based on its configuration

@param string $name
@param array  $parameters

@return mixed
Resolves the component based on its configuration