Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/paste/conduit/PasteConduitAPIMethod.php
12241 views
1
<?php
2
3
abstract class PasteConduitAPIMethod extends ConduitAPIMethod {
4
5
final public function getApplication() {
6
return PhabricatorApplication::getByClass('PhabricatorPasteApplication');
7
}
8
9
protected function buildPasteInfoDictionary(PhabricatorPaste $paste) {
10
return array(
11
'id' => $paste->getID(),
12
'objectName' => 'P'.$paste->getID(),
13
'phid' => $paste->getPHID(),
14
'authorPHID' => $paste->getAuthorPHID(),
15
'filePHID' => $paste->getFilePHID(),
16
'title' => $paste->getTitle(),
17
'dateCreated' => $paste->getDateCreated(),
18
'language' => $paste->getLanguage(),
19
'uri' => PhabricatorEnv::getProductionURI('/P'.$paste->getID()),
20
'parentPHID' => $paste->getParentPHID(),
21
'content' => $paste->getRawContent(),
22
);
23
}
24
25
}
26
27