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

Class: WindSimpleController

Source Location: /web/WindSimpleController.php

Class WindSimpleController

Class Overview

Implements interfaces:

操作控制器,管理用户的请求处理操作.

该类有一个抽象方法作为默认处理用户请求的操作实现'run',用户可以通过实现该方法处理请求

Located in /web/WindSimpleController.php [line 12]

WindModule
   |
   --WindSimpleController
Author(s): API Tags:
Abstract:  

Information Tags:
Version:  $Id: WindSimpleController.php 3279 2011-12-29 03:43:19Z yishuo $
Copyright:  ©2003-2103 phpwind.com
License:  http://www.windframework.com

Properties

Methods

[ Top ]
Descendants
Child Class Description
WindController 操作控制器,管理一组用于处理用户的请求的处理操作.

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

Inherited From WindModule

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

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 ]
Method Summary
void   addMessage()   添加错误信息
void   afterAction()   action操作结束后调用
void   beforeAction()   action操作开始前调用
void   doAction()  
void   forwardAction()   重定向一个请求到另外的action
void   forwardRedirect()   重定向一个请求到另外的URL
WindErrorMessage   getErrorMessage()  
WindForward   getForward()  
array|string   getInput()   获得输入数据
void   resolveActionFilter()   action过滤链策略部署
string   resolvedActionMethod()   解析action操作方法名称
void   run()   默认的操作处理方法
void   saveToken()   保存token令牌
void   setDefaultTemplateName()   设置默认的模板名称
void   setErrorMessage()  
void   setForward()  
void   setGlobal()   设置模板数据
void   setLayout()   设置布局页面
void   setOutput()   设置模板数据
void   setTemplate()   设置页面模板
void   setTemplateExt()   设置模板文件的扩展名
void   setTemplatePath()   设置模板路径,模板目录地址,支持命名空间方式
void   setTheme()   设置当前主题信息
void   setThemePackage()   设置主题包
void   showMessage()   发送一个错误请求
void   validateToken()   验证令牌

[ Top ]
Properties
WindErrorMessage   $errorMessage = null [line 20]
API Tags:
Access:  protected


[ Top ]
WindForward   $forward = null [line 16]
API Tags:
Access:  protected


[ Top ]
Methods
addMessage  [line 255]

  void addMessage( string $message, [string $key = '']  )

添加错误信息

Parameters:
string   $message: 
string   $key:  默认为空字符串

API Tags:
Access:  protected


[ Top ]
afterAction  [line 103]

  void afterAction( AbstractWindRouter $handlerAdapter  )

action操作结束后调用

Parameters:
AbstractWindRouter   $handlerAdapter: 

API Tags:
Access:  protected


[ Top ]
beforeAction  [line 96]

  void beforeAction( AbstractWindRouter $handlerAdapter  )

action操作开始前调用

Parameters:
AbstractWindRouter   $handlerAdapter: 

API Tags:
Access:  protected


Redefined in descendants as:

[ Top ]
doAction  [line 32]

  void doAction( $handlerAdapter  )

Parameters:
   $handlerAdapter: 

API Tags:
Access:  public


Implementation of:
IWindController::doAction()
处理请求并返回Forward对象

[ Top ]
forwardAction  [line 114]

  void forwardAction( string $action, [array $args = array()], [boolean $isRedirect = false], [boolean $immediately = true]  )

重定向一个请求到另外的action

Parameters:
string   $action:  支持格式:module/controller/action/?args
array   $args:  参数信息 默认为空数组
boolean   $isRedirect:  是否是重定向请求 以url重定向方式跳转
boolean   $immediately:  是否立即forward

API Tags:
Access:  protected


[ Top ]
forwardRedirect  [line 124]

  void forwardRedirect( string $url  )

重定向一个请求到另外的URL

Parameters:
string   $url: 

API Tags:
Access:  protected


[ Top ]
getErrorMessage  [line 302]

  WindErrorMessage getErrorMessage( )


API Tags:
Access:  public


[ Top ]
getForward  [line 295]

  WindForward getForward( )


API Tags:
Access:  public


[ Top ]
getInput  [line 160]

  array|string getInput( string $name, [string $type = ''], [string $callback = null]  )

获得输入数据

如果输入了回调方法则返回数组:第一个值:value;第二个值:验证结果

Parameters:
string   $name:  input name
string   $type:  input type (GET POST COOKIE)
string   $callback:  validation for input

API Tags:
Access:  protected


[ Top ]
resolveActionFilter  [line 79]

  void resolveActionFilter( array $filters  )

action过滤链策略部署

Parameters:
array   $filters: 

API Tags:
Access:  protected
Example:  example not found


[ Top ]
resolvedActionMethod  [line 288]

  string resolvedActionMethod( WindUrlBasedRouter $handlerAdapter  )

解析action操作方法名称

可以通过覆盖该方法,改变action解析规则

Parameters:
WindUrlBasedRouter   $handlerAdapter: 

API Tags:
Return:  返回解析到的action操作处理方法,默认只返回run
Access:  protected


Redefined in descendants as:

[ Top ]
run  [line 27]

  void run( )

默认的操作处理方法


API Tags:
Abstract:  
Access:  public


Redefined in descendants as:

[ Top ]
saveToken  [line 50]

  void saveToken( [ $tokenName = 'token']  )

保存token令牌

Parameters:
   $tokenName: 

API Tags:
Access:  protected


[ Top ]
setDefaultTemplateName  [line 279]

  void setDefaultTemplateName( WindUrlBasedRouter $handlerAdapter  )

设置默认的模板名称

Parameters:
WindUrlBasedRouter   $handlerAdapter: 

API Tags:
Access:  protected


[ Top ]
setErrorMessage  [line 316]

  void setErrorMessage( WindErrorMessage $errorMessage  )

Parameters:
WindErrorMessage   $errorMessage: 

API Tags:
Access:  public


[ Top ]
setForward  [line 309]

  void setForward( WindForward $forward  )

Parameters:
WindForward   $forward: 

API Tags:
Access:  public


[ Top ]
setGlobal  [line 147]

  void setGlobal( string|array|object $data, [string $key = '']  )

设置模板数据

Parameters:
string|array|object    $data: 
string   $key: 

API Tags:
Access:  protected


[ Top ]
setLayout  [line 243]

  void setLayout( string $layout  )

设置布局页面

Parameters:
string   $layout: 

API Tags:
Access:  protected


[ Top ]
setOutput  [line 136]

  void setOutput( string|array|object $data, [string $key = '']  )

设置模板数据

Parameters:
string|array|object    $data: 
string   $key: 

API Tags:
Access:  protected


[ Top ]
setTemplate  [line 193]

  void setTemplate( string $template  )

设置页面模板

Parameters:
string   $template: 

API Tags:
Access:  protected


[ Top ]
setTemplateExt  [line 213]

  void setTemplateExt( string $templateExt  )

设置模板文件的扩展名

Parameters:
string   $templateExt: 

API Tags:
Access:  protected


[ Top ]
setTemplatePath  [line 203]

  void setTemplatePath( string $templatePath  )

设置模板路径,模板目录地址,支持命名空间方式

Parameters:
string   $templatePath: 

API Tags:
Access:  protected


[ Top ]
setTheme  [line 223]

  void setTheme( string $theme  )

设置当前主题信息

Parameters:
string   $theme: 

API Tags:
Access:  protected


[ Top ]
setThemePackage  [line 233]

  void setThemePackage( string $package  )

设置主题包

Parameters:
string   $package: 

API Tags:
Access:  protected


[ Top ]
showMessage  [line 267]

  void showMessage( [string $message = ''], [string $key = ''], [string $errorAction = '']  )

发送一个错误请求

Parameters:
string   $message:  默认为空字符串
string   $key:  默认为空字符串
string   $errorAction:  默认为空字符串

API Tags:
Access:  protected


[ Top ]
validateToken  [line 63]

  void validateToken( string $tokenValue, [string $tokenName = 'token']  )

验证令牌

Parameters:
string   $tokenValue:  当前获得的token值
string   $tokenName:  token名称

API Tags:
Access:  protected


[ Top ]

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