Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96190172
PhabricatorSearchAbstractDocument.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
Mon, Dec 23, 14:40
Size
2 KB
Mime Type
text/x-php
Expires
Wed, Dec 25, 14:40 (2 d)
Engine
blob
Format
Raw Data
Handle
23135461
Attached To
rPH Phabricator
PhabricatorSearchAbstractDocument.php
View Options
<?php
/**
* @group search
*/
final
class
PhabricatorSearchAbstractDocument
{
private
$phid
;
private
$documentType
;
private
$documentTitle
;
private
$documentCreated
;
private
$documentModified
;
private
$fields
=
array
();
private
$relationships
=
array
();
public
static
function
getSupportedTypes
()
{
return
array
(
DifferentialPHIDTypeRevision
::
TYPECONST
=>
'Differential Revisions'
,
PhabricatorRepositoryPHIDTypeCommit
::
TYPECONST
=>
'Repository Commits'
,
ManiphestPHIDTypeTask
::
TYPECONST
=>
'Maniphest Tasks'
,
PhabricatorPHIDConstants
::
PHID_TYPE_WIKI
=>
'Phriction Documents'
,
PhabricatorPHIDConstants
::
PHID_TYPE_USER
=>
'Phabricator Users'
,
PhabricatorPHIDConstants
::
PHID_TYPE_QUES
=>
'Ponder Questions'
,
);
}
public
function
setPHID
(
$phid
)
{
$this
->
phid
=
$phid
;
return
$this
;
}
public
function
setDocumentType
(
$document_type
)
{
$this
->
documentType
=
$document_type
;
return
$this
;
}
public
function
setDocumentTitle
(
$title
)
{
$this
->
documentTitle
=
$title
;
$this
->
addField
(
PhabricatorSearchField
::
FIELD_TITLE
,
$title
);
return
$this
;
}
public
function
addField
(
$field
,
$corpus
,
$aux_phid
=
null
)
{
$this
->
fields
[]
=
array
(
$field
,
$corpus
,
$aux_phid
);
return
$this
;
}
public
function
addRelationship
(
$type
,
$related_phid
,
$rtype
,
$time
)
{
$this
->
relationships
[]
=
array
(
$type
,
$related_phid
,
$rtype
,
$time
);
return
$this
;
}
public
function
setDocumentCreated
(
$date
)
{
$this
->
documentCreated
=
$date
;
return
$this
;
}
public
function
setDocumentModified
(
$date
)
{
$this
->
documentModified
=
$date
;
return
$this
;
}
public
function
getPHID
()
{
return
$this
->
phid
;
}
public
function
getDocumentType
()
{
return
$this
->
documentType
;
}
public
function
getDocumentTitle
()
{
return
$this
->
documentTitle
;
}
public
function
getDocumentCreated
()
{
return
$this
->
documentCreated
;
}
public
function
getDocumentModified
()
{
return
$this
->
documentModified
;
}
public
function
getFieldData
()
{
return
$this
->
fields
;
}
public
function
getRelationshipData
()
{
return
$this
->
relationships
;
}
}
Event Timeline
Log In to Comment