Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/contentsource/PhabricatorContentSource.php
Show All 36 Lines | final public static function newForSource( | ||||
if (isset($map[$source])) { | if (isset($map[$source])) { | ||||
$obj = clone $map[$source]; | $obj = clone $map[$source]; | ||||
} else { | } else { | ||||
if ($force) { | if ($force) { | ||||
$obj = new PhabricatorUnknownContentSource(); | $obj = new PhabricatorUnknownContentSource(); | ||||
} else { | } else { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Content source type "%s" is not known to Phabricator!', | 'Content source type "%s" is unknown.', | ||||
$source)); | $source)); | ||||
} | } | ||||
} | } | ||||
$obj->source = $source; | $obj->source = $source; | ||||
$obj->params = $params; | $obj->params = $params; | ||||
return $obj; | return $obj; | ||||
Show All 39 Lines |