public function getShared($name)
    {
        if (isset($this->_instances[$name])) {
            return $this->_instances[$name];
        }

        if (isset($this->_definitions[$name])) {
            return $this->_instances[$name] = $this->getInstance($this->_definitions[$name], null, $name);
        } elseif (strpos($name, '\\') !== false) {
            return $this->_instances[$name] = $this->getInstance($name, null, $name);
        } else {
            $className = $this->_getPatterned($name);
            if ($className === null) {
                throw new InvalidValueException(['`:component` component is not exists', 'component' => $name]);
            }
            return $this->_instances[$name] = $this->getInstance($className, null, $name);
        }
    }