コード例 #1
0
 /**
  * @return BaseInputFilter
  */
 public function getInputFilter()
 {
     if (!$this->inputFilter) {
         $inputFilter = new BaseInputFilter();
         $factory = new InputFactory();
         $inputFilter->add($factory->createInput(array('name' => 'query', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'StringLength', 'options' => array('encoding' => 'UTF-8', 'min' => 2, 'max' => 128))))));
         $this->inputFilter = $inputFilter;
     }
     return $this->inputFilter;
 }
コード例 #2
0
 /**
  * @return InputFilter
  */
 public function getInputFilter()
 {
     if (!$this->inputFilter) {
         $inputFilter = new BaseInputFilter();
         $factory = new InputFactory();
         $inputFilter->add($factory->createInput(array('name' => 'id', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')), 'validators' => array(array('name' => 'Digits')))));
         $this->inputFilter = $inputFilter;
     }
     return $this->inputFilter;
 }