Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conduit/parametertype/ConduitParameterType.php
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | abstract class ConduitParameterType extends Phobject { | ||||
final public function getExamples() { | final public function getExamples() { | ||||
return $this->getParameterExamples(); | return $this->getParameterExamples(); | ||||
} | } | ||||
protected function raiseValidationException(array $request, $key, $message) { | protected function raiseValidationException(array $request, $key, $message) { | ||||
// TODO: Specialize this so we can give users more tailored messages from | // TODO: Specialize this so we can give users more tailored messages from | ||||
// Conduit. | // Conduit. | ||||
throw new Exception($message); | throw new Exception( | ||||
pht( | |||||
'Error while reading "%s": %s', | |||||
$key, | |||||
$message)); | |||||
} | } | ||||
final public static function getAllTypes() { | final public static function getAllTypes() { | ||||
return id(new PhutilClassMapQuery()) | return id(new PhutilClassMapQuery()) | ||||
->setAncestorClass(__CLASS__) | ->setAncestorClass(__CLASS__) | ||||
->setUniqueMethod('getTypeName') | ->setUniqueMethod('getTypeName') | ||||
->setSortMethod('getTypeName') | ->setSortMethod('getTypeName') | ||||
Show All 25 Lines |