Resolve name, according to name resolver options.

@param Name $name Function or constant name to resolve
@param int  $type One of Stmt\Use_::TYPE_*

@return Name Resolved name, or original name with attribute
426844
protected function resolveName(Name $name, $type) {
        $resolvedName = $this->nameContext->getResolvedName($name, $type);
        if (null !== $resolvedName) {
            $name->setAttribute('resolvedName', $resolvedName->toString());
        }
        return $name;
    }
704153
public function resolve($type)
    {
        if (!is_string($type)) {
            throw new InvalidArgumentException(
                'Can not resolve class ident: type must be a string'
            );
        }

        // Normalize requested type with prefix / suffix, if applicable.
        $type = $this->prefix.$type.$this->suffix;

        $capitalizeNext = function(&$i) {
            $i = ucfirst($i);
        };

        $capitals = $this->capitals;
        foreach ($capitals as $cap) {
            $expl = explode($cap, $type);
            array_walk($expl, $capitalizeNext);
            $type = implode($cap, $expl);
        }

        $replacements = $this->replacements;
        foreach ($replacements as $rep => $target) {
            $type = str_replace($rep, $target, $type);
        }

        $class = '\\'.trim($type, '\\');

        return $class;
    }
318807
def _resolve_name(self, name):
        
        res = [name]
        while True:
            orig_names = self._search("types", name)
            if orig_names is not None:
                name = orig_names[-1]
                # pop off the typedefd name
                res.pop()
                # add back on the original names
                res += orig_names
            else:
                break

        return res
597862
public function resolved($name) {
		$name = $this->getAlias($name);

		return array_key_exists($name, $this->instances);
	}
225518
public function getInputType($type, $name)
    {
        if (in_array($name, $this->specials)) {
            return $name;
        }

        if (array_key_exists($type, $this->types)) {
            return $this->types[$type];
        }

        return in_array($type, $this->inputs) ? $type : 'text';
    }
1133824
public function getType($name)
    {
        $map = $this->getTypeMap();
        return isset($map[$name]) ? $map[$name] : NULL;
    }
426960
public static function nameToClass($name, $type)
    {
        if (!isset(self::$masks[$type])) {
            throw new InvalidArgumentException(
                "Invalid mask type " . $type . "!"
            );
        }
        return str_replace("*", $name, self::$masks[$type]);
    }
315023
public function fetchId($type, $name)
    {
        return Inflector::dasherize($this->_parent->getName()) . '-' . Str::slug($type);
    }
794930
public static function setter($name, $type)
  {
    $setter = self::method(
      'set' . ucfirst($name),
      [
        new ParameterGenerator($name, $type)
      ]
    );

    $setter->getDocBlock()->setTag(new GenericTag('return', 'static'));

    $body = "\$this->{$name} = \${$name};" . PHP_EOL
    . "return \$this;" . PHP_EOL;

    $setter->setBody($body);

    return $setter;
  }
557853
protected function resolveNameValue($name)
    {
    	if ($name === null) return null;

    	if ($prefixName = $this->getPrefixName()) {

    		$name = $prefixName . $name;
    	}

    	return $name;
    }
1354009
public static function passive(string $name, Type $type): self
    {
        $self = new self($name, $type);
        $self->passive = true;

        return $self;
    }
647768
public function type(string $type): ResolverInterface
    {
        $this->type = DataType::make($type);

        return $this;
    }
442195
public static function getByName(string $name, int $type = Search::ANY): string
    {
        self::loadData();
        $kbEntrys = self::getVariable($name);
        if (isset($kbEntrys->a)) {
            foreach ($kbEntrys->a as $kbEntry) {
                if ($type === Search::ANY) {
                    return Search::$data->urls[$kbEntry->u]."#".$kbEntry->a;
                } elseif ($type === Search::MYSQL) {
                    if ($kbEntry->t === Search::MYSQL) {
                        return Search::$data->urls[$kbEntry->u]."#".$kbEntry->a;
                    }
                } elseif ($type === Search::MARIADB) {
                    if ($kbEntry->t === Search::MARIADB) {
                        return Search::$data->urls[$kbEntry->u]."#".$kbEntry->a;
                    }
                }
            }
        }

        throw new KBException("$name does not exist for this type of documentation !");
    }
1185523
public static function build_id( $type, $name )
	{
		if ( !is_null( static::$id_prefix ) )
		{
			return static::$id_prefix.'-'.static::form_id( $type, $name );
		}
		return static::form_id( $type, $name );
	}
46159
public static function getTypeByName($name)
    {
        /** @noinspection PhpUndefinedMethodInspection */
        $typeRec = static::whereName($name)->get(['type'])->first();

        return (isset($typeRec, $typeRec['type'])) ? $typeRec['type'] : null;
    }
300532
public function addType(Type $type, $name = '')
    {
        if (!$name) {
            $name = (string)$type;
        }

        $this->types[$name] = $type;
    }
730333
private function getKey(string $name, string $type = self::TYPE_QUEUE) : string
    {
        return $name . ':' . $type;
    }