| 1 | <?php |
||
| 6 | class BooleanCatser implements CasterInterface |
||
| 7 | { |
||
| 8 | /** @var array */ |
||
| 9 | protected $allowedBooleanString = [ |
||
| 10 | '0', 'false', 'False', 'FALSE', 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' |
||
| 11 | ]; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @param array $allowedBooleanString |
||
| 15 | */ |
||
| 16 | 80 | public function __construct(array $allowedBooleanString = null) |
|
| 22 | |||
| 23 | /** |
||
| 24 | * {@inheritdoc} |
||
| 25 | */ |
||
| 26 | 15 | public function cast($value) |
|
| 36 | } |
||
| 37 |