Path: blob/master/src/applications/metamta/stamp/PhabricatorMailStamp.php
12256 views
<?php12abstract class PhabricatorMailStamp3extends Phobject {45private $key;6private $value;7private $label;8private $viewer;910final public function getStampType() {11return $this->getPhobjectClassConstant('STAMPTYPE');12}1314final public function setKey($key) {15$this->key = $key;16return $this;17}1819final public function getKey() {20return $this->key;21}2223final protected function setRawValue($value) {24$this->value = $value;25return $this;26}2728final protected function getRawValue() {29return $this->value;30}3132final public function setViewer(PhabricatorUser $viewer) {33$this->viewer = $viewer;34return $this;35}3637final public function getViewer() {38return $this->viewer;39}4041final public function setLabel($label) {42$this->label = $label;43return $this;44}4546final public function getLabel() {47return $this->label;48}4950public function setValue($value) {51return $this->setRawValue($value);52}5354final public function toDictionary() {55return array(56'type' => $this->getStampType(),57'key' => $this->getKey(),58'value' => $this->getValueForDictionary(),59);60}6162final public static function getAllStamps() {63return id(new PhutilClassMapQuery())64->setAncestorClass(__CLASS__)65->setUniqueMethod('getStampType')66->execute();67}6869protected function getValueForDictionary() {70return $this->getRawValue();71}7273public function setValueFromDictionary($value) {74return $this->setRawValue($value);75}7677public function getValueForRendering() {78return $this->getRawValue();79}8081abstract public function renderStamps($value);8283final protected function renderStamp($key, $value = null) {84return $key.'('.$value.')';85}8687}888990