Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122869493
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
Tue, Jul 22, 15:49
Size
803 B
Mime Type
text/x-php
Expires
Thu, Jul 24, 15:49 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27530223
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