Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99299267
PhabricatorDatasourceEngine.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, Jan 23, 05:43
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Jan 25, 05:43 (2 d)
Engine
blob
Format
Raw Data
Handle
23771240
Attached To
rPH Phabricator
PhabricatorDatasourceEngine.php
View Options
<?php
final
class
PhabricatorDatasourceEngine
extends
Phobject
{
private
$viewer
;
public
function
setViewer
(
PhabricatorUser
$viewer
)
{
$this
->
viewer
=
$viewer
;
return
$this
;
}
public
function
getViewer
()
{
return
$this
->
viewer
;
}
public
function
getAllQuickSearchDatasources
()
{
return
PhabricatorDatasourceEngineExtension
::
getAllQuickSearchDatasources
();
}
public
function
newJumpURI
(
$query
)
{
$viewer
=
$this
->
getViewer
();
$extensions
=
PhabricatorDatasourceEngineExtension
::
getAllExtensions
();
foreach
(
$extensions
as
$extension
)
{
$jump_uri
=
id
(
clone
$extension
)
->
setViewer
(
$viewer
)
->
newJumpURI
(
$query
);
if
(
$jump_uri
!==
null
)
{
return
$jump_uri
;
}
}
return
null
;
}
public
function
newDatasourcesForCompositeDatasource
(
PhabricatorTypeaheadCompositeDatasource
$datasource
)
{
$viewer
=
$this
->
getViewer
();
$extensions
=
PhabricatorDatasourceEngineExtension
::
getAllExtensions
();
$sources
=
array
();
foreach
(
$extensions
as
$extension
)
{
$extension_sources
=
id
(
clone
$extension
)
->
setViewer
(
$viewer
)
->
newDatasourcesForCompositeDatasource
(
$datasource
);
foreach
(
$extension_sources
as
$extension_source
)
{
$sources
[]
=
$extension_source
;
}
}
return
$sources
;
}
}
Event Timeline
Log In to Comment