Page MenuHomeWickedGov Phorge

ResolvedName.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

ResolvedName.php

<?php
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
namespace Microsoft\PhpParser;
class ResolvedName {
private $parts = [];
/**
* @param Token[] $tokens
*/
public static function buildName(array $tokens, $content) : ResolvedName {
$name = new ResolvedName();
foreach ($tokens as $token) {
if ($token->kind === TokenKind::Name) {
$name->parts[] = $token->getText($content);
}
}
return $name;
}
public function addNameParts(array $parts, $content) {
foreach ($parts as $part) {
if ($part->kind === TokenKind::Name && !($part instanceof MissingToken)) {
$this->parts[] = $part->getText($content);
}
}
}
public function getNameParts() {
return $this->parts;
}
public function getFullyQualifiedNameText() : string {
return join("\\", $this->parts);
}
public function __toString() {
return $this->getFullyQualifiedNameText();
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, Oct 3, 21:32 (1 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a5/98/5e9709029978190e9e6fa4bdbdd0
Default Alt Text
ResolvedName.php (1 KB)

Event Timeline