Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5980743
ResolvedName.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ResolvedName.php
View Options
<?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
Details
Attached
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)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment