2011-07-30 03:31:14 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
abstract class ConduitAPI_paste_Method extends ConduitAPIMethod {
|
|
|
|
|
2013-03-13 15:09:05 +01:00
|
|
|
public function getApplication() {
|
2014-07-23 02:03:09 +02:00
|
|
|
return PhabricatorApplication::getByClass('PhabricatorPasteApplication');
|
2013-03-13 15:09:05 +01:00
|
|
|
}
|
|
|
|
|
2011-07-30 03:31:14 +02:00
|
|
|
protected function buildPasteInfoDictionary(PhabricatorPaste $paste) {
|
|
|
|
return array(
|
|
|
|
'id' => $paste->getID(),
|
|
|
|
'objectName' => 'P'.$paste->getID(),
|
|
|
|
'phid' => $paste->getPHID(),
|
|
|
|
'authorPHID' => $paste->getAuthorPHID(),
|
|
|
|
'filePHID' => $paste->getFilePHID(),
|
|
|
|
'title' => $paste->getTitle(),
|
|
|
|
'dateCreated' => $paste->getDateCreated(),
|
|
|
|
'language' => $paste->getLanguage(),
|
|
|
|
'uri' => PhabricatorEnv::getProductionURI('/P'.$paste->getID()),
|
|
|
|
'parentPHID' => $paste->getParentPHID(),
|
2012-12-20 21:24:34 +01:00
|
|
|
'content' => $paste->getRawContent(),
|
2011-07-30 03:31:14 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|