Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1078394
DivinerAtomSearchIndexer.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DivinerAtomSearchIndexer.php
View Options
<?php
final
class
DivinerAtomSearchIndexer
extends
PhabricatorSearchDocumentIndexer
{
public
function
getIndexableObject
()
{
return
new
DivinerLiveSymbol
();
}
protected
function
buildAbstractDocumentByPHID
(
$phid
)
{
$atom
=
$this
->
loadDocumentByPHID
(
$phid
);
$book
=
$atom
->
getBook
();
if
(!
$atom
->
getIsDocumentable
())
{
return
null
;
}
$doc
=
$this
->
newDocument
(
$phid
)
->
setDocumentTitle
(
$atom
->
getTitle
())
->
setDocumentCreated
(
$book
->
getDateCreated
())
->
setDocumentModified
(
$book
->
getDateModified
());
$doc
->
addField
(
PhabricatorSearchDocumentFieldType
::
FIELD_BODY
,
$atom
->
getSummary
());
$doc
->
addRelationship
(
PhabricatorSearchRelationship
::
RELATIONSHIP_BOOK
,
$atom
->
getBookPHID
(),
DivinerBookPHIDType
::
TYPECONST
,
PhabricatorTime
::
getNow
());
$doc
->
addRelationship
(
PhabricatorSearchRelationship
::
RELATIONSHIP_REPOSITORY
,
$atom
->
getRepositoryPHID
(),
PhabricatorRepositoryRepositoryPHIDType
::
TYPECONST
,
PhabricatorTime
::
getNow
());
$doc
->
addRelationship
(
$atom
->
getGraphHash
()
?
PhabricatorSearchRelationship
::
RELATIONSHIP_CLOSED
:
PhabricatorSearchRelationship
::
RELATIONSHIP_OPEN
,
$atom
->
getBookPHID
(),
DivinerBookPHIDType
::
TYPECONST
,
PhabricatorTime
::
getNow
());
return
$doc
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jun 29, 7:48 PM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
264023
Default Alt Text
DivinerAtomSearchIndexer.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment