Phan\Language\FQSEN\FullyQualifiedGlobalStructuralElement::make PHP Méthode

make() public static méthode

public static make ( string $namespace, string $name, integer $alternate_id ) : static
$namespace string The namespace in this element's scope
$name string The name of this structural element
$alternate_id integer An alternate ID for the elemnet for use when there are multiple definitions of the element
Résultat static
    public static function make(string $namespace, string $name, int $alternate_id = 0)
    {
        // Transfer any relative namespace stuff from the
        // name to the namespace.
        $name_parts = explode('\\', $name);
        $name = array_pop($name_parts);
        $namespace = implode('\\', array_merge([$namespace], $name_parts));
        $namespace = self::cleanNamespace($namespace);
        $key = strtolower(implode('|', [get_called_class(), static::toString($namespace, $name, $alternate_id)]));
        $fqsen = self::memoizeStatic($key, function () use($namespace, $name, $alternate_id) {
            return new static($namespace, $name, $alternate_id);
        });
        return $fqsen;
    }