<?php
namespace Moto\Application\Installation\InputFilter; use Moto\InputFilter\AbstractInputFilter; use Zend\Validator; use Moto\Application\ServerTest; use Moto\Application\Users; class Process extends AbstractInputFilter { protected $_name = 'install.process'; public function init() { $this->add(array( 'name' => 'language', 'required' => true, 'filters' => array( array('name' => 'StripTags'), array('name' => 'StringTrim'), ), 'validators' => array( array( 'name' => 'StringLength', 'options' => array( 'encoding' => 'UTF-8', 'min' => 5, 'max' => 5, ), ), ), )); $this->add(new ServerTest\InputFilter\DataBase(), 'database'); $this->add(new ProductInfo(), 'productInfo'); $this->add(new Admin(), 'admin'); $this->add(array( 'name' => 'website.address', 'required' => true, 'filters' => array( array('name' => 'StripTags'), array('name' => 'StringTrim'), array( 'name' => 'Moto\Filter\UriNormalize', 'options' => array( 'removeFragment' => true ) ), ), 'validators' => array( array( 'name' => 'StringLength', 'options' => array( 'encoding' => 'UTF-8', 'min' => 1, 'max' => 200, ), 'break_chain_on_failure' => true ), array( 'name' => 'Uri', 'options' => array( 'allowAbsolute' => true, 'allowRelative' => false, ), ) ), )); } } 