Resolves `self` class name with value

@param Name $name Instance of original node

@return Name|FullyQualified
762181
protected function resolveClassName(Name $name): Name
    {
        // Skip all names except special `self`
        if (strtolower($name->toString()) !== 'self') {
            return $name;
        }

        // Save the original name
        $originalName = $name;
        $name = clone $originalName;
        $name->setAttribute('originalName', $originalName);

        $fullClassName    = Name::concat($this->namespace, $this->className);
        $resolvedSelfName = new FullyQualified('\\' . ltrim($fullClassName->toString(), '\\'), $name->getAttributes());

        $this->replacedNodes[] = $resolvedSelfName;

        return $resolvedSelfName;
    }
1178517
protected function resolve($name, $options = null)
    {
        $widget = $this->getService($name);
        $wDefinition = $widget->getDefinition();

        if (is_array($wDefinition) && !$widget->isResolved()) {

            if (isset($wDefinition['path']) && !class_exists($wDefinition['className'], false)) {
                include_once $wDefinition['path'];
            }

            if (isset($wDefinition['options'])) {
                $options = array_merge($wDefinition['options'], $options);
            }
        }

        $instance = $widget->resolve([$options], $this->getDI());

        if ($instance instanceof InjectionAwareInterface) {
            $instance->setDI($this->getDI());
        }

        return $instance;
    }
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);
    }
554739
public static function missing(string $name): self
    {
        $e = sprintf(parent::MISSING, $name);

        return new static($e);
    }
1294744
protected function resolveDirectory(string $name): string
    {
        $dir = rtrim($this->manager->vendorDir(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
        $dir .= rtrim(implode(DIRECTORY_SEPARATOR, explode('/', $name)), DIRECTORY_SEPARATOR);
        return $dir;
    }
1273255
protected function resolveKey($name)
    {
        if (false !== $pos = strrpos($name, $this->namespaceCharacter)) {
            $name = substr($name, $pos + 1);
        }

        return $name;
    }
1045185
public function container($name)
    {
        if (!isset($this->container[$name])) {
            $this->container[$name] = IOC::resolve($name);
        }

        return $this->container[$name];
    }
899689
public static function getInstance(string $name = 'default'): self
    {
        if (!isset(self::$instances[$name])) {
            self::setInstance($name, new self());
        }

        return self::$instances[$name];
    }
22119
public static function get($name)
    {
        $class = get_called_class();
    
        if (!isset(self::$instance[$class])) {
            self::$instance[$class] = new static();
        }
        
        return self::$instance[$class]->getExtensions()->get($name);
    }
1055027
private function getClassFor($name)
    {
        $test = strtolower($name);
        foreach ($this->types as $class => $matchers) {
            foreach ($matchers as $matcher) {
                if ($test === $matcher) {
                    return $class;
                }
            }
        }
        return $this->genericType;
    }
539516
private function resolveChild(string $name): FormBuilderInterface
    {
        list($type, $options) = $this->unresolvedChildren[$name];

        unset($this->unresolvedChildren[$name]);

        return $this->children[$name] = $this->create($name, $type, $options);
    }
90445
private function resolveClassName($name) {
        $name = str_replace('/', '\\', trim($name));

        // no need to resolve a qualified name
        if (strContains($name, '\\'))
            return is_class($name) ? [$name] : [];

        // unqualified name, check "use" declarations
        $lowerName = strtolower($name);
        if (isset($this->uses[$lowerName]))
            return [$this->uses[$lowerName]];

        // unqualified name, check imported namespaces
        $results = [];
        foreach ($this->imports as $namespace) {
            $class = $namespace.$name;
            if (is_class($class))
                $results[] = $class;
        }
        return $results;
    }
1341994
public function instance($name)
    {
        // If the class name starts with a dot, then find the class in the same class path as the caller
        if(substr($name, 0, 1) == '.')
        {
            $name = $this->getJaxonClassPath() . $name;
        }
        // The class namespace is prepended to the class name
        elseif(substr($name, 0, 1) == ':' && ($namespace = $this->getJaxonNamespace()))
        {
            $name = str_replace('\\', '.', trim($namespace, '\\')) . '.' . substr($name, 1);
        }
        return jaxon()->sentry()->instance($name);
    }
77131
protected function getFullyQualifiedName($name)
    {
        if ($name instanceof FullyQualifiedName) {
            return \implode('\\', $name->parts);
        } elseif ($name instanceof Name) {
            $name = $name->parts;
        } elseif (!\is_array($name)) {
            $name = [$name];
        }

        return \implode('\\', \array_merge($this->namespace, $name));
    }
268275
protected function get($name)
    {
        return isset($this->sources[$name]) ? $this->sources[$name] : $this->resolve($name);
    }
781429
public function withName(string $name): self
    {
        $self = clone $this;
        $self->name = $name;

        return $self;
    }
552454
protected function resolveXRef($name)
    {
        if (($obj = $this->value[$name]) instanceof ElementXRef) {
            /** @var PDFObject $obj */
            $obj                = $this->document->getObjectById($obj->getId());
            $this->value[$name] = $obj;
        }

        return $this->value[$name];
    }