Differential D19005 Diff 45570 src/applications/metamta/adapter/PhabricatorMailImplementationAdapter.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/adapter/PhabricatorMailImplementationAdapter.php
<?php | <?php | ||||
abstract class PhabricatorMailImplementationAdapter extends Phobject { | abstract class PhabricatorMailImplementationAdapter extends Phobject { | ||||
private $key; | private $key; | ||||
private $priority; | |||||
private $options = array(); | private $options = array(); | ||||
final public function getAdapterType() { | final public function getAdapterType() { | ||||
return $this->getPhobjectClassConstant('ADAPTERTYPE'); | return $this->getPhobjectClassConstant('ADAPTERTYPE'); | ||||
} | } | ||||
final public static function getAllAdapters() { | final public static function getAllAdapters() { | ||||
return id(new PhutilClassMapQuery()) | return id(new PhutilClassMapQuery()) | ||||
Show All 38 Lines | final public function setKey($key) { | ||||
$this->key = $key; | $this->key = $key; | ||||
return $this; | return $this; | ||||
} | } | ||||
final public function getKey() { | final public function getKey() { | ||||
return $this->key; | return $this->key; | ||||
} | } | ||||
final public function setPriority($priority) { | |||||
$this->priority = $priority; | |||||
return $this; | |||||
} | |||||
final public function getPriority() { | |||||
return $this->priority; | |||||
} | |||||
final public function getOption($key) { | final public function getOption($key) { | ||||
if (!array_key_exists($key, $this->options)) { | if (!array_key_exists($key, $this->options)) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Mailer ("%s") is attempting to access unknown option ("%s").', | 'Mailer ("%s") is attempting to access unknown option ("%s").', | ||||
get_class($this), | get_class($this), | ||||
$key)); | $key)); | ||||
} | } | ||||
Show All 20 Lines |