src/validator/OperatorValidator.class.php 1 location
|
@@ 144-153 (lines=10) @@
|
| 141 |
|
* @author Uwe Mesecke <[email protected]> |
| 142 |
|
* @since 0.11.0 |
| 143 |
|
*/ |
| 144 |
|
public function addChild(Validator $validator) |
| 145 |
|
{ |
| 146 |
|
$name = $validator->getName(); |
| 147 |
|
if (isset($this->children[$name])) { |
| 148 |
|
throw new \InvalidArgumentException('A validator with the name "' . $name . '" already exists'); |
| 149 |
|
} |
| 150 |
|
|
| 151 |
|
$this->children[$name] = $validator; |
| 152 |
|
$validator->setParentContainer($this); |
| 153 |
|
} |
| 154 |
|
|
| 155 |
|
/** |
| 156 |
|
* Returns a named child validator. |
src/validator/ValidationManager.class.php 1 location
|
@@ 187-196 (lines=10) @@
|
| 184 |
|
* @author Uwe Mesecke <[email protected]> |
| 185 |
|
* @since 0.11.0 |
| 186 |
|
*/ |
| 187 |
|
public function addChild(Validator $validator) |
| 188 |
|
{ |
| 189 |
|
$name = $validator->getName(); |
| 190 |
|
if (isset($this->children[$name])) { |
| 191 |
|
throw new \InvalidArgumentException('A validator with the name "' . $name . '" already exists'); |
| 192 |
|
} |
| 193 |
|
|
| 194 |
|
$this->children[$name] = $validator; |
| 195 |
|
$validator->setParentContainer($this); |
| 196 |
|
} |
| 197 |
|
|
| 198 |
|
/** |
| 199 |
|
* Returns a named child validator. |