Resolves a component, the resolved component is stored in the DI, subsequent requests for this component will return the same instance

@param string $name

@return mixed
15130
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);
        }
    }
1288743
public function resolve($name)
    {
        try {
            return parent::resolve($name);
        } catch (\DomainException $e) {
            if (substr($name, -10) === 'Repository') {
                $name = substr($name, 0, -10);
                $name .= 'Model';

                try {
                    return parent::resolve($name);
                } catch (\DomainException $ex) {
                    throw new \DomainException($e->getMessage(), $e->getCode(), $e);
                }
            } elseif (substr($name, -5) === 'Model') {
                $name = substr($name, 0, -5);
                $name .= 'Repository';

                try {
                    return parent::resolve($name);
                } catch (\DomainException $ex) {
                    throw new \DomainException($e->getMessage(), $e->getCode(), $e);
                }
            }
        }
    }
1001809
protected function get($name)
    {
        return isset($this->brokers[$name]) ? $this->brokers[$name] : $this->resolve($name);
    }
1159434
public function get($name)
    {
        $name = $this->cleanAttributeName($name);

        return isset($this->props[$name]) ? $this->props[$name] : null;
    }
1341299
protected static function resolveFacadeInstance($name)
    {
        if (is_object($name)) {
            return $name;
        }
        if (isset(static::$instance[$name])) {
            return static::$instance[$name];
        }

        return static::$instance[$name] = static::$app->get($name);
    }
818937
public function get($name)
    {
        if(array_key_exists($name, $this->services))
            return $this->services[$name];

        return $this->services[$name] = $this->solve('service', $name, array($this));
    }
1255886
public function findOrFail($name)
    {
        $component = $this->find($name);

        if ($component !== null) {
            return $component;
        }

        throw new ComponentNotFoundException("Component [{$name}] does not exist!");
    }
1043088
public function getComponentByName($name)
    {
        $components = $this->getComponentRepository();
        if ($components->has($name) === false) {
            throw new RuntimeException("Component [$name] does not exists.");
        }

        return $components->get($name);
    }
684768
public function resolveByName($name)
    {
        $detectedAdapter = $this->detectByName($name);

        if ($detectedAdapter === null) {
            $exception = EnvironmentAdapterNotFoundException::createByName($name);
            throw $exception;
        }

        return $detectedAdapter;
    }
798337
protected function getInterface($name) {
    if (isset($this->requiredInterfaces[$name])) {
      return $this->requiredInterfaces[$name];
    }
    return null;
  }
707936
public function getProvider($name)
    {
        if (!$this->has($name)) {
            throw new DependencyException(
                $name.' dependency not found.',
                1
            );
        }

        return $this->dependencies[$name];
    }
179264
public function get($name)
    {
        if (array_key_exists($name, $this->elements)) {
            return $this->resolveXRef($name);
        }

        return new ElementMissing(null, null);
    }
1168806
protected function resolve($name)
    {
        $config = $this->getConfig($name);

        if (empty($config)) {
            throw new InvalidArgumentException("Source repository [{$name}] is not defined.");
        }

        if (isset($this->customSourceCreators[$config['type']])) {
            return $this->callCustomSourceCreators($config);
        }
        $repositoryMethod = 'create'.ucfirst($name).'Repository';

        if (method_exists($this, $repositoryMethod)) {
            return $this->{$repositoryMethod}($config);
        }
        throw new InvalidArgumentException("Repository [{$name}] is not supported.");
    }
744891
public function get(string $name)
    {
        $name = $this->getDefinitiveName($name);

        if (!$this->has($name)) {
            $instance = $this->build($name);
            $this->store($instance);
        }

        return $this->instances[$name];
    }
599140
protected function getComponent(string $name)
    {
        if (!is_object($this->components[$name])) {
            $this->components[$name] = $this->createComponent($name);
        }

        return $this->components[$name];
    }
852098
public function find($name)
    {
        foreach ($this->all() as $component) {
            if ($component->getLowerName() === strtolower($name)) {
                return $component;
            }
        }

        return;
    }
1134460
private function resolveAction($name)
    {
        $info = $this->unresolvedActions[$name];
        $child = $this->createAction($name, $info['type'], $info['options']);
        $this->actions[$name] = $child;
        unset($this->unresolvedActions[$name]);

        return $child;
    }