Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/adapter/PhabricatorMailAdapter.php
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | final public function setMedia(array $media) { | ||||
$native_map = array_fuse($native_map); | $native_map = array_fuse($native_map); | ||||
foreach ($media as $medium) { | foreach ($media as $medium) { | ||||
if (!isset($native_map[$medium])) { | if (!isset($native_map[$medium])) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Adapter ("%s") is configured for medium "%s", but this is not '. | 'Adapter ("%s") is configured for medium "%s", but this is not '. | ||||
'a supported delivery medium. Supported media are: %s.', | 'a supported delivery medium. Supported media are: %s.', | ||||
get_class($this), | |||||
$medium, | $medium, | ||||
implode(', ', $native_map))); | implode(', ', $native_map))); | ||||
} | } | ||||
} | } | ||||
$this->media = $media; | $this->media = $media; | ||||
$this->mediaMap = null; | $this->mediaMap = null; | ||||
return $this; | return $this; | ||||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |