1 | <?php |
||
19 | class PropertySchema |
||
20 | { |
||
21 | /** |
||
22 | * @var SplObjectStorage|PropertyVerifierInterface[] |
||
23 | */ |
||
24 | protected $verifiers; |
||
25 | |||
26 | /** |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $name; |
||
31 | |||
32 | /** |
||
33 | * |
||
34 | * @var integer |
||
35 | */ |
||
36 | protected $type; |
||
37 | |||
38 | /** |
||
39 | * @param null $name |
||
40 | */ |
||
41 | public function __construct($name = null) |
||
46 | |||
47 | /** |
||
48 | * @return string |
||
49 | */ |
||
50 | public function getPropertyName() |
||
54 | |||
55 | /** |
||
56 | * @param string $name |
||
57 | * |
||
58 | * @return $this |
||
59 | */ |
||
60 | public function setPropertyName($name) |
||
66 | |||
67 | /** |
||
68 | * @return int |
||
69 | */ |
||
70 | public function getType() |
||
74 | |||
75 | /** |
||
76 | * @param int $type |
||
77 | * |
||
78 | * @return $this |
||
79 | */ |
||
80 | public function setType($type) |
||
86 | |||
87 | /** |
||
88 | * @return SplObjectStorage|PropertyVerifierInterface[] |
||
89 | */ |
||
90 | public function getVerifiers() |
||
94 | |||
95 | /** |
||
96 | * @param PropertyVerifierInterface $pv |
||
97 | * |
||
98 | * @return $this |
||
99 | */ |
||
100 | public function addVerifier(PropertyVerifierInterface $pv) |
||
106 | |||
107 | |||
108 | /** |
||
109 | * @param PropertyVerifierInterface $pv |
||
110 | * |
||
111 | * @return $this |
||
112 | */ |
||
113 | public function removeVerifier(PropertyVerifierInterface $pv) |
||
119 | |||
120 | /** |
||
121 | * @param $value |
||
122 | * |
||
123 | * @return void |
||
124 | * |
||
125 | * @throws IllegalPropertyException |
||
126 | */ |
||
127 | public function validate($value) |
||
138 | } |
||
139 |