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

Class: WindWebApplication

Source Location: /web/WindWebApplication.php

Class WindWebApplication

Class Overview

Implements interfaces:

应用控制器,协调处理用户请求,处理,跳转分发等工作

Located in /web/WindWebApplication.php [line 13]

WindModule
   |
   --WindWebApplication
Author(s): Information Tags:
Version:  $Id: WindWebApplication.php 3391 2012-03-13 03:09:26Z 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 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
WindWebApplication   __construct()   应用初始化操作
void   checkProcess()   检查请求的合法性
void   doDispatch()  
object   getComponent()   获得组件对象
mixed   getGlobal()   获取全局变量
array   getModules()   获得module配置,$name为空时返回当前module配置
WindHttpRequest   getRequest()  
WindHttpResponse   getResponse()  
array   getUrlArgs()   获取urlArg值
WindFactory   getWindFactory()  
void   resolveActionMapping()   解析action过滤链的配置信息
void   run()  
void   runProcess()   执行请求的进程
void   sendErrorMessage()   处理错误请求
void   setConfig()  
void   setGlobal()   设置全局变量
array   setModules()   添加module配置
void   setUrlArgs()   设置urlargs值

[ Top ]
Properties
mixed   $defaultModule = array(
'controller-path' => 'controller',
'controller-suffix' => 'Controller',
'error-handler' => 'WIND:web.WindErrorHandler')
[line 35]
API Tags:
Access:  protected


[ Top ]
WindDispatcher   $dispatcher = null [line 29]
API Tags:
Access:  protected


[ Top ]
WindRouter   $handlerAdapter = null [line 34]
API Tags:
Access:  protected


[ Top ]
WindHttpRequest   $request [line 17]
API Tags:
Access:  protected


[ Top ]
WindHttpResponse   $response [line 21]
API Tags:
Access:  protected


[ Top ]
mixed   $token = '' [line 30]
API Tags:
Access:  protected


[ Top ]
WindFactory   $windFactory = null [line 25]
API Tags:
Access:  protected


[ Top ]
Methods
Constructor __construct  [line 47]

  WindWebApplication __construct( WindHttpRequest $request, WindHttpResponse $response, WindFactory $factory  )

应用初始化操作

Parameters:
WindHttpRequest   $request: 
WindHttpResponse   $response: 
WindFactory   $factory: 

API Tags:
Access:  public


[ Top ]
checkProcess  [line 336]

  void checkProcess( )

检查请求的合法性

检查请求的合法性,当判断请求不合法时,抛出一个终止异常并终止当前进程


API Tags:
Access:  protected

Information Tags:
Throws:  WindFinalException

[ Top ]
doDispatch  [line 56]

  void doDispatch( $forward, [ $display = false]  )

Parameters:
   $forward: 
   $display: 

API Tags:
Access:  public


[ Top ]
getComponent  [line 232]

  object getComponent( string $componentName  )

获得组件对象

Parameters:
string   $componentName:  组件名称呢个

API Tags:
Access:  public


[ Top ]
getGlobal  [line 159]

  mixed getGlobal( )

获取全局变量


API Tags:
Access:  public


[ Top ]
getModules  [line 221]

  array getModules( [string $name = '']  )

获得module配置,$name为空时返回当前module配置

Parameters:
string   $name:  module名称 默认为空

API Tags:
Access:  public

Information Tags:
Throws:  WindException
Throws:  WindActionException

[ Top ]
getRequest  [line 349]

  WindHttpRequest getRequest( )


API Tags:
Access:  public


Redefinition of:
WindModule::getRequest()
返回当前应用的WindHttpRequest对象

[ Top ]
getResponse  [line 356]

  WindHttpResponse getResponse( )


API Tags:
Access:  public


Redefinition of:
WindModule::getResponse()
返回当前应用的WindHttpResponse对象

[ Top ]
getUrlArgs  [line 170]

  array getUrlArgs( )

获取urlArg值


API Tags:
Access:  public


[ Top ]
getWindFactory  [line 363]

  WindFactory getWindFactory( )


API Tags:
Access:  public


[ Top ]
resolveActionMapping  [line 254]

  void resolveActionMapping( array $filters, WindSimpleController $handler  )

解析action过滤链的配置信息

Parameters:
array   $filters: 
WindSimpleController   $handler: 

API Tags:
Access:  protected


[ Top ]
run  [line 64]

  void run( )


API Tags:
Access:  public


[ Top ]
runProcess  [line 132]

  void runProcess( IWindController $handler  )

执行请求的进程

Parameters:
IWindController   $handler: 

API Tags:
Access:  public

Information Tags:
Throws:  WindFinalException

[ Top ]
sendErrorMessage  [line 298]

  void sendErrorMessage( WindActionException $exception  )

处理错误请求

根据错误请求的相关信息,将程序转向到错误处理句柄进行错误处理

Parameters:
WindActionException   $exception:  actionException

API Tags:
Access:  protected

Information Tags:
Throws:  WindFinalException

[ Top ]
setConfig  [line 115]

  void setConfig( $config  )

Parameters:
   $config: 

API Tags:
Access:  public


Redefinition of:
WindModule::setConfig()
设置类配置

[ Top ]
setGlobal  [line 144]

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

设置全局变量

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

API Tags:
Access:  public


[ Top ]
setModules  [line 205]

  array setModules( string $name, array $config, [boolean $replace = false]  )

添加module配置

  1.  <controller-path>controller</controller-path>
  2.  <!-- 指定该模块下的controller的后缀格式 -->
  3.  <controller-suffix>Controller</controller-suffix>
  4.  <!-- 配置该模块的error处理的action controller类 -->
  5.  <error-handler>WIND:web.WindErrorHandler</error-handler>
  6.  <!-- 试图相关配置,config中配置可以根据自己的需要进行配置或是使用缺省 -->
  7.  <!-- 可以在这里进行view的配置,该配置只会影响该module下的view行为,该配置可以设置也可以不设置 -->
  8.  <!-- 指定模板路径 -->
  9.  <template-dir>template</template-dir>
  10.  <!-- 指定模板后缀 -->
  11.  <template-ext>htm</template-ext>

Parameters:
string   $name:  module名称
array   $config:  配置数组
boolean   $replace:  如果module已经存在是否覆盖他 默认值为false不进行覆盖

API Tags:
Access:  public


[ Top ]
setUrlArgs  [line 180]

  void setUrlArgs( string $data, string $key  )

设置urlargs值

Parameters:
string   $data: 
string   $key: 

API Tags:
Access:  public


[ Top ]

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