phpDocumentor web
filter
[ class tree: web ] [ index: web ] [ all elements ]

Class: WindFormFilter

Source Location: /web/filter/WindFormFilter.php

Class WindFormFilter

Class Overview

form表单拦截器

form表单拦截器允许用户配置实现form表单验证: <note>注意:

  • form表单必须继承WindEnableValidateModule;
  • form表单中的所有属性都必须设置setVar和getVar存取方法对;
  • form表单实现的验证配置validateRules,也将会在设置完属性之后执行验证;
  • 该表单在验证完成之后,会将该表单实例以[表单类名]为名字保存在Request中,在获取的时候只要通过request->getInput('表单类名')获取即可;
</note>

该formFilter接受一个配置form,该配置项指向需要过滤的表单类文件. 例如:

  1.  'filters' => array(
  2.  'class' => 'WIND:filter.WindFilterChain',
  3.  'filter1' => array(
  4.  'class' => 'WIND:web.filter.WindFormFilter',    //将filter指定为该formFilter
  5.  'pattern' => '*',
  6.  'form' => 'MY:form.MyForm',
  7.  )
  8.  )
在action中获取的时候使用:
  1.  $this->getInput('myForm');//获得配置的过滤表单

Located in /web/filter/WindFormFilter.php [line 40]

WindModule
   |
   --WindHandlerInterceptor
      |
      --WindActionFilter
         |
         --WindFormFilter
Author(s): Information Tags:
Version:  $Id: WindFormFilter.php 3269 2011-12-21 06:16:00Z yishuo $
Copyright:  ©2003-2103 phpwind.com
License:  http://www.windframework.com

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From WindActionFilter

WindActionFilter::$errorMessage
WindActionFilter::$forward
WindActionFilter::$router

Inherited From WindHandlerInterceptor

WindHandlerInterceptor::$interceptorChain
WindHandlerInterceptor::$result

Inherited From WindModule

WindModule::$_config
WindModule::$_proxy
WindModule::$_typeValidation

Inherited From WindActionFilter

WindActionFilter::__construct()
构造函数
WindActionFilter::getInput()
从指定源中根据输入的参数名获得输入数据
WindActionFilter::setGlobal()
设置全局模板数据
WindActionFilter::setOutput()
设置模板数据

Inherited From WindHandlerInterceptor

WindHandlerInterceptor::handle()
拦截器的执行入口
WindHandlerInterceptor::postHandle()
拦截器的后置操作
WindHandlerInterceptor::preHandle()
拦截器的前置操作
WindHandlerInterceptor::setHandlerInterceptorChain()
设置拦截链对象

Inherited From WindModule

WindModule::getConfig()
根据配置名取得相应的配置
WindModule::getRequest()
返回当前应用的WindHttpRequest对象
WindModule::getResponse()
返回当前应用的WindHttpResponse对象
WindModule::getSystemFactory()
返回当前应用的WindFactory对象
WindModule::setConfig()
设置类配置
WindModule::setDelayAttributes()
设置延迟加载类属性相关组件配置信息
WindModule::toArray()
返回该对象的数组类型
WindModule::writeTableCloneProperty()
类对象clone白名单
WindModule::__call()
重载了魔术方法__call
WindModule::__clone()
重载魔术方法__clone
WindModule::__get()
重载了魔术方法__get
WindModule::__set()
重载了魔术方法__set

[ Top ]
Property Summary
string   $form   验证的表单类

[ Top ]
Method Summary
void   postHandle()  
void   preHandle()  

[ Top ]
Properties
string   $form = '' [line 47]

验证的表单类

API Tags:
Access:  protected


[ Top ]
Methods
postHandle  [line 85]

  void postHandle( )


API Tags:
Access:  public


Redefinition of:
WindHandlerInterceptor::postHandle()
拦截器的后置操作

[ Top ]
preHandle  [line 52]

  void preHandle( )


API Tags:
Access:  public


Redefinition of:
WindHandlerInterceptor::preHandle()
拦截器的前置操作

[ Top ]

Documentation generated on Fri, 30 Mar 2012 11:43:33 +0800 by phpDocumentor 1.4.4