| 1 | <?php |
||
| 13 | class BooleanBehavior extends Behavior |
||
| 14 | { |
||
| 15 | const RETURN_TYPE_INT = 'int'; |
||
| 16 | const RETURN_TYPE_BOOL = 'bool'; |
||
| 17 | |||
| 18 | /** @var string|string[] */ |
||
| 19 | public $attributes; |
||
| 20 | |||
| 21 | /** @var string */ |
||
| 22 | public $returnType; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return array |
||
| 26 | */ |
||
| 27 | public function events() |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return void |
||
| 38 | */ |
||
| 39 | public function process() |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param string|int|bool $value |
||
| 50 | * @return bool |
||
| 51 | */ |
||
| 52 | protected function map($value) { |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @param bool $value |
||
| 66 | * @return bool|int |
||
| 67 | * @throws InvalidConfigException |
||
| 68 | */ |
||
| 69 | protected function makeReturnValue(bool $value) |
||
| 76 | } |