<?php
namespace Moto\InputFilter\ClickAction; use Moto\InputFilter\AbstractInputFilter; class File extends AbstractInputFilter { public function init() { $this->add(array( 'name' => 'file', 'required' => true, 'filters' => array( array('name' => 'StripTags'), array('name' => 'StringTrim'), ), 'validators' => array( array( 'name' => 'StringLength', 'options' => array( 'encoding' => 'UTF-8', 'min' => 1, 'max' => 512, ), ), ), )); $this->add(array( 'name' => 'mediaId', 'required' => false, 'filters' => array( array('name' => 'StripTags'), array('name' => 'StringTrim'), ) )); $this->add(array( 'name' => 'forceDownload', 'required' => false, 'filters' => array( array('name' => 'Boolean'), ) )); $this->add(array( 'name' => 'fileName', 'required' => false, 'filters' => array( array('name' => 'StripTags'), array('name' => 'StringTrim'), ), 'validators' => array( array( 'name' => 'StringLength', 'options' => array( 'encoding' => 'UTF-8', 'min' => 0, 'max' => 100, ), ), ), )); } }