Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conduit/parametertype/ConduitParameterType.php
Show All 32 Lines | abstract class ConduitParameterType extends Phobject { | ||||
final public function getValue(array $request, $key) { | final public function getValue(array $request, $key) { | ||||
if (!$this->getExists($request, $key)) { | if (!$this->getExists($request, $key)) { | ||||
return $this->getParameterDefault(); | return $this->getParameterDefault(); | ||||
} | } | ||||
return $this->getParameterValue($request, $key); | return $this->getParameterValue($request, $key); | ||||
} | } | ||||
final public function getKeys($key) { | |||||
return $this->getParameterKeys($key); | |||||
} | |||||
final public function getDefaultValue() { | final public function getDefaultValue() { | ||||
return $this->getParameterDefault(); | return $this->getParameterDefault(); | ||||
} | } | ||||
final public function getTypeName() { | final public function getTypeName() { | ||||
return $this->getParameterTypeName(); | return $this->getParameterTypeName(); | ||||
Show All 32 Lines | abstract class ConduitParameterType extends Phobject { | ||||
protected function getParameterExists(array $request, $key) { | protected function getParameterExists(array $request, $key) { | ||||
return array_key_exists($key, $request); | return array_key_exists($key, $request); | ||||
} | } | ||||
protected function getParameterValue(array $request, $key) { | protected function getParameterValue(array $request, $key) { | ||||
return $request[$key]; | return $request[$key]; | ||||
} | } | ||||
protected function getParameterKeys($key) { | |||||
return array($key); | |||||
} | |||||
abstract protected function getParameterTypeName(); | abstract protected function getParameterTypeName(); | ||||
abstract protected function getParameterFormatDescriptions(); | abstract protected function getParameterFormatDescriptions(); | ||||
abstract protected function getParameterExamples(); | abstract protected function getParameterExamples(); | ||||
protected function getParameterDefault() { | protected function getParameterDefault() { | ||||
return null; | return null; | ||||
} | } | ||||
} | } |