1 | <?php |
||
4 | class PropRule |
||
5 | { |
||
6 | /** @var array */ |
||
7 | protected $map; |
||
8 | |||
9 | /** |
||
10 | * @param array $map |
||
11 | */ |
||
12 | 4 | public function __construct(array $map) |
|
16 | |||
17 | /** |
||
18 | * @param string $name |
||
19 | * @param mixed $default |
||
20 | * @return null|mixed |
||
21 | */ |
||
22 | 4 | public function getKey($name, $default = null) |
|
26 | |||
27 | /** |
||
28 | * @param string|null $default |
||
29 | * @return string|null |
||
30 | */ |
||
31 | 4 | public function getProp($default = null) |
|
35 | |||
36 | /** |
||
37 | * @return mixed|null |
||
38 | */ |
||
39 | 2 | public function getSet() |
|
43 | |||
44 | /** |
||
45 | * @return mixed|null |
||
46 | */ |
||
47 | 2 | public function getGetter() |
|
48 | { |
||
49 | 2 | return $this->getKey('get'); |
|
50 | } |
||
51 | |||
52 | /** |
||
53 | * @return string |
||
54 | */ |
||
55 | 4 | public function getType() |
|
59 | } |
||
60 |