| @@ 257-293 (lines=37) @@ | ||
| 254 | /** |
|
| 255 | * @return InputFilterInterface |
|
| 256 | */ |
|
| 257 | public function getInputFilter() |
|
| 258 | { |
|
| 259 | if (!$this->inputFilter) { |
|
| 260 | $inputFilter = new InputFilter(); |
|
| 261 | $factory = new InputFactory(); |
|
| 262 | ||
| 263 | $inputFilter->add($factory->createInput(array( |
|
| 264 | 'name' => 'identifier', |
|
| 265 | 'required' => true, |
|
| 266 | 'filters' => array( |
|
| 267 | array( |
|
| 268 | 'name' => 'StripTags' |
|
| 269 | ), |
|
| 270 | array( |
|
| 271 | 'name' => 'StringTrim' |
|
| 272 | ), |
|
| 273 | array( |
|
| 274 | 'name' => 'PlaygroundCore\Filter\Slugify' |
|
| 275 | ) |
|
| 276 | ), |
|
| 277 | 'validators' => array( |
|
| 278 | array( |
|
| 279 | 'name' => 'StringLength', |
|
| 280 | 'options' => array( |
|
| 281 | 'encoding' => 'UTF-8', |
|
| 282 | 'min' => 3, |
|
| 283 | 'max' => 255 |
|
| 284 | ) |
|
| 285 | ) |
|
| 286 | ) |
|
| 287 | ))); |
|
| 288 | ||
| 289 | $this->inputFilter = $inputFilter; |
|
| 290 | } |
|
| 291 | ||
| 292 | return $this->inputFilter; |
|
| 293 | } |
|
| 294 | } |
|
| 295 | ||
| @@ 373-409 (lines=37) @@ | ||
| 370 | /** |
|
| 371 | * @return InputFilter $inputFilter |
|
| 372 | */ |
|
| 373 | public function getInputFilter() |
|
| 374 | { |
|
| 375 | if (!$this->inputFilter) { |
|
| 376 | $inputFilter = new InputFilter(); |
|
| 377 | $factory = new InputFactory(); |
|
| 378 | ||
| 379 | $inputFilter->add($factory->createInput(array( |
|
| 380 | 'name' => 'identifier', |
|
| 381 | 'required' => true, |
|
| 382 | 'filters' => array( |
|
| 383 | array( |
|
| 384 | 'name' => 'StripTags' |
|
| 385 | ), |
|
| 386 | array( |
|
| 387 | 'name' => 'StringTrim' |
|
| 388 | ), |
|
| 389 | array( |
|
| 390 | 'name' => 'PlaygroundCore\Filter\Slugify' |
|
| 391 | ) |
|
| 392 | ), |
|
| 393 | 'validators' => array( |
|
| 394 | array( |
|
| 395 | 'name' => 'StringLength', |
|
| 396 | 'options' => array( |
|
| 397 | 'encoding' => 'UTF-8', |
|
| 398 | 'min' => 3, |
|
| 399 | 'max' => 255 |
|
| 400 | ) |
|
| 401 | ) |
|
| 402 | ) |
|
| 403 | ))); |
|
| 404 | ||
| 405 | $this->inputFilter = $inputFilter; |
|
| 406 | } |
|
| 407 | ||
| 408 | return $this->inputFilter; |
|
| 409 | } |
|
| 410 | ||
| 411 | /** |
|
| 412 | * @param InputFilterInterface $inputFilter |
|