<?php
namespace Moto\Application\Settings\InputFilter; use Moto\InputFilter\AbstractInputFilter; use Moto; class MailConnectionConfig extends AbstractInputFilter { protected $_name = 'settingsWebsite.mailConnectionConfig'; public function init() { $this->add(array( 'name' => 'username', 'required' => false, 'allow_empty' => true, 'filters' => array( array('name' => 'StripTags'), array('name' => 'StringTrim'), ), 'continue_if_empty' => true, 'validators' => array( array( 'name' => 'StringLength', 'options' => array( 'encoding' => 'UTF-8', 'min' => 0, 'max' => 256, ), ), ), )); $this->add(array( 'name' => 'password', 'required' => false, 'allow_empty' => true, 'filters' => array( array('name' => 'StripTags'), array('name' => 'StringTrim'), ), 'continue_if_empty' => true, 'validators' => array( array( 'name' => 'StringLength', 'options' => array( 'encoding' => 'UTF-8', 'min' => 0, 'max' => 256, ), ), ), )); $this->add(array( 'name' => 'ssl', 'required' => false, 'allow_empty' => true, 'filters' => array( array('name' => 'StripTags'), array('name' => 'StringTrim'), ), 'continue_if_empty' => true, 'validators' => array( array( 'name' => 'InArray', 'options' => array( 'haystack' => array('', 'none', 'ssl', 'tls') ) ), ), )); } }