Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F110082175
PhutilQueryString.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Apr 24, 15:13
Size
805 B
Mime Type
text/x-php
Expires
Sat, Apr 26, 15:13 (1 d, 19 h)
Engine
blob
Format
Raw Data
Handle
25783462
Attached To
rPHU libphutil
PhutilQueryString.php
View Options
<?php
final
class
PhutilQueryString
extends
Phobject
{
private
$escaper
;
private
$argv
;
public
function
__construct
(
PhutilQsprintfInterface
$escaper
,
array
$argv
)
{
$this
->
escaper
=
$escaper
;
$this
->
argv
=
$argv
;
// This makes sure we throw immediately if there are errors in the
// parameters.
$this
->
getMaskedString
();
}
public
function
__toString
()
{
return
$this
->
getMaskedString
();
}
public
function
getUnmaskedString
()
{
return
$this
->
renderString
(
true
);
}
public
function
getMaskedString
()
{
return
$this
->
renderString
(
false
);
}
private
function
renderString
(
$unmasked
)
{
return
xsprintf
(
'xsprintf_query'
,
array
(
'escaper'
=>
$this
->
escaper
,
'unmasked'
=>
$unmasked
,
),
$this
->
argv
);
}
}
Event Timeline
Log In to Comment