for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* File containing the {@link Request_Param_Validator_Enum} class.
*
* @package Application Utils
* @subpackage Request
* @see Request_Param_Validator_Enum
*/
declare(strict_types=1);
namespace AppUtils;
* Validates the value according to a list of possible values.
* @author Sebastian Mordziol <[email protected]>
class Request_Param_Validator_Enum extends Request_Param_Validator
{
public function getDefaultOptions() : array
return array(
'values' => array()
);
}
protected function _validate()
if(in_array($this->value, $this->getArrayOption('values'))) {
return $this->value;
return null;