Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5980102
StringLiteral.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
StringLiteral.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\Node
;
use
Microsoft\PhpParser\Node
;
use
Microsoft\PhpParser\Token
;
class
StringLiteral
extends
Expression
{
/** @var Token */
public
$startQuote
;
/** @var Token[]|Node[]|Token */
public
$children
;
/** @var Token */
public
$endQuote
;
const
CHILD_NAMES
=
[
'startQuote'
,
'children'
,
'endQuote'
,
];
public
function
getStringContentsText
()
{
// TODO add tests
$stringContents
=
""
;
if
(
isset
(
$this
->
startQuote
))
{
foreach
(
$this
->
children
as
$child
)
{
$contents
=
$this
->
getFileContents
();
$stringContents
.=
$child
->
getFullText
(
$contents
);
}
}
else
{
// TODO ensure string consistency (all strings should have start / end quote)
$stringContents
=
trim
(
$this
->
children
->
getText
(
$this
->
getFileContents
()),
'"
\'
'
);
}
return
$stringContents
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 21:14 (6 d, 5 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
2e/d1/bd91e675fce21368b5a6b6d5025b
Default Alt Text
StringLiteral.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment