| @@ 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 | ||
| @@ 397-433 (lines=37) @@ | ||
| 394 | /** |
|
| 395 | * @return InputFilter $inputFilter |
|
| 396 | */ |
|
| 397 | public function getInputFilter() |
|
| 398 | { |
|
| 399 | if (!$this->inputFilter) { |
|
| 400 | $inputFilter = new InputFilter(); |
|
| 401 | $factory = new InputFactory(); |
|
| 402 | ||
| 403 | $inputFilter->add($factory->createInput(array( |
|
| 404 | 'name' => 'identifier', |
|
| 405 | 'required' => true, |
|
| 406 | 'filters' => array( |
|
| 407 | array( |
|
| 408 | 'name' => 'StripTags' |
|
| 409 | ), |
|
| 410 | array( |
|
| 411 | 'name' => 'StringTrim' |
|
| 412 | ), |
|
| 413 | array( |
|
| 414 | 'name' => 'PlaygroundCore\Filter\Slugify' |
|
| 415 | ) |
|
| 416 | ), |
|
| 417 | 'validators' => array( |
|
| 418 | array( |
|
| 419 | 'name' => 'StringLength', |
|
| 420 | 'options' => array( |
|
| 421 | 'encoding' => 'UTF-8', |
|
| 422 | 'min' => 3, |
|
| 423 | 'max' => 255 |
|
| 424 | ) |
|
| 425 | ) |
|
| 426 | ) |
|
| 427 | ))); |
|
| 428 | ||
| 429 | $this->inputFilter = $inputFilter; |
|
| 430 | } |
|
| 431 | ||
| 432 | return $this->inputFilter; |
|
| 433 | } |
|
| 434 | ||
| 435 | /** |
|
| 436 | * @param InputFilterInterface $inputFilter |
|