Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F123257521
PholioIndexer.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
Sat, Jul 26, 01:15
Size
803 B
Mime Type
text/x-php
Expires
Mon, Jul 28, 01:15 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27673040
Attached To
rPH Phabricator
PholioIndexer.php
View Options
<?php
/**
* @group pholio
*/
final
class
PholioIndexer
extends
PhabricatorSearchDocumentIndexer
{
public
static
function
indexMock
(
PholioMock
$mock
)
{
$doc
=
new
PhabricatorSearchAbstractDocument
();
$doc
->
setPHID
(
$mock
->
getPHID
());
$doc
->
setDocumentType
(
phid_get_type
(
$mock
->
getPHID
()));
$doc
->
setDocumentTitle
(
$mock
->
getName
());
$doc
->
setDocumentCreated
(
$mock
->
getDateCreated
());
$doc
->
setDocumentModified
(
$mock
->
getDateModified
());
$doc
->
addField
(
PhabricatorSearchField
::
FIELD_BODY
,
$mock
->
getDescription
());
$doc
->
addRelationship
(
PhabricatorSearchRelationship
::
RELATIONSHIP_AUTHOR
,
$mock
->
getAuthorPHID
(),
PhabricatorPHIDConstants
::
PHID_TYPE_USER
,
$mock
->
getDateCreated
());
self
::
reindexAbstractDocument
(
$doc
);
}
}
Event Timeline
Log In to Comment