36 array $trueValues = [
true, 1,
'true',
'1'],
37 array $falseValues = [
false, 0,
'false',
'0']
39 $this->trueValues = $trueValues;
40 $this->falseValues = $falseValues;
58 if (in_array(
$value, $this->trueValues,
true)) {
61 if (in_array(
$value, $this->falseValues,
true)) {
64 $allowedValues = array_merge($this->trueValues, $this->falseValues);
65 throw new \InvalidArgumentException(
66 'Boolean value is expected, supported values: ' . var_export($allowedValues,
true)
79 if (in_array(
$value, $this->trueValues,
true)) {
__construct(array $trueValues=[true, 1, 'true', '1'], array $falseValues=[false, 0, 'false', '0'])
elseif(isset( $params[ 'redirect_parent']))