Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/contentsource/PhabricatorContentSource.php
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | abstract class PhabricatorContentSource extends Phobject { | ||||
final public function serialize() { | final public function serialize() { | ||||
return phutil_json_encode( | return phutil_json_encode( | ||||
array( | array( | ||||
'source' => $this->getSource(), | 'source' => $this->getSource(), | ||||
'params' => $this->params, | 'params' => $this->params, | ||||
)); | )); | ||||
} | } | ||||
/** | |||||
* Get the internal source name | |||||
* | |||||
* This is usually coming from a SOURCECONST constant. | |||||
* | |||||
* @return string|null | |||||
*/ | |||||
final public function getSource() { | final public function getSource() { | ||||
return $this->source; | return $this->source; | ||||
} | } | ||||
final public function getContentSourceParameter($key, $default = null) { | final public function getContentSourceParameter($key, $default = null) { | ||||
return idx($this->params, $key, $default); | return idx($this->params, $key, $default); | ||||
} | } | ||||
} | } |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0