Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122290575
PhabricatorSavedQuery.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, Jul 17, 02:04
Size
940 B
Mime Type
text/x-php
Expires
Sat, Jul 19, 02:04 (2 d)
Engine
blob
Format
Raw Data
Handle
27441618
Attached To
rPH Phabricator
PhabricatorSavedQuery.php
View Options
<?php
/**
* @group search
*/
final
class
PhabricatorSavedQuery
extends
PhabricatorSearchDAO
{
protected
$parameters
=
array
();
protected
$queryKey
=
""
;
protected
$engineClassName
=
"PhabricatorPasteSearchEngine"
;
public
function
getConfiguration
()
{
return
array
(
self
::
CONFIG_SERIALIZATION
=>
array
(
'parameters'
=>
self
::
SERIALIZATION_JSON
),
)
+
parent
::
getConfiguration
();
}
public
function
setParameter
(
$key
,
$value
)
{
$this
->
parameters
[
$key
]
=
$value
;
return
$this
;
}
public
function
getParameter
(
$key
,
$default
=
null
)
{
return
idx
(
$this
->
parameters
,
$key
,
$default
);
}
public
function
save
()
{
if
(
$this
->
getEngineClass
()
===
null
)
{
throw
new
Exception
(
pht
(
"Engine class is null."
));
}
$serial
=
$this
->
getEngineClass
().
serialize
(
$this
->
parameters
);
$this
->
queryKey
=
PhabricatorHash
::
digestForIndex
(
$serial
);
return
parent
::
save
();
}
}
Event Timeline
Log In to Comment