Package | system.web |
---|---|
Inheritance | class CWebApplication » CApplication » CModule » CComponent |
Since | 1.0 |
Version | $Id$ |
Source Code | framework/web/CWebApplication.php |
Property | Type | Description | Defined By |
---|---|---|---|
assetManager | CAssetManager | the asset manager component | CWebApplication |
authManager | IAuthManager | the authorization manager component | CWebApplication |
basePath | string | the root directory of the application. | CApplication |
baseUrl | string | Returns the relative URL for the application. | CWebApplication |
behaviors | array | the behaviors that should be attached to the module. | CModule |
cache | CCache | the cache application component. | CApplication |
catchAllRequest | array | the configuration specifying a controller which should handle all user requests. | CWebApplication |
charset | string | the charset currently used for the application. | CApplication |
clientScript | CClientScript | Returns the client script manager. | CWebApplication |
components | array | the currently loaded components (indexed by their IDs) | CModule |
controller | CController | the currently active controller | CWebApplication |
controllerMap | array | mapping from controller ID to controller configurations. | CWebApplication |
controllerPath | string | the directory that contains the controller classes. | CWebApplication |
coreMessages | CPhpMessageSource | the core message translations | CApplication |
dateFormatter | CDateFormatter | the locale-dependent date formatter. | CApplication |
db | CDbConnection | the database connection | CApplication |
defaultController | string | the ID of the default controller. | CWebApplication |
errorHandler | CErrorHandler | the error handler application component. | CApplication |
extensionPath | string | Returns the root directory that holds all third-party extensions. | CApplication |
homeUrl | string | the homepage URL | CWebApplication |
id | string | a unique identifier for the application. | CApplication |
language | string | the language that the user is using and the application should be targeted to. | CApplication |
layout | mixed | the application-wide layout. | CWebApplication |
layoutPath | string | the root directory of layout files. | CWebApplication |
locale | CLocale | the locale instance | CApplication |
messages | CMessageSource | the application message translations | CApplication |
modulePath | string | the directory that contains the application modules. | CModule |
modules | array | the configuration of the currently installed modules (module ID => configuration) | CModule |
name | string | the application name. | CApplication |
numberFormatter | CNumberFormatter | the locale-dependent number formatter. | CApplication |
params | CAttributeCollection | the list of user-defined parameters | CModule |
parentModule | CModule | the parent module. | CModule |
preload | array | the IDs of the application components that should be preloaded. | CModule |
request | CHttpRequest | the request component | CApplication |
runtimePath | string | the directory that stores runtime files. | CApplication |
securityManager | CSecurityManager | the security manager application component. | CApplication |
session | CHttpSession | the session component | CWebApplication |
sourceLanguage | string | the language that the application is written in. | CApplication |
statePersister | CStatePersister | the state persister application component. | CApplication |
systemViewPath | string | the root directory of system view files. | CWebApplication |
theme | CTheme | the theme used currently. | CWebApplication |
themeManager | CThemeManager | the theme manager. | CWebApplication |
timeZone | string | Returns the time zone used by this application. | CApplication |
urlManager | CUrlManager | the URL manager component | CApplication |
user | CWebUser | the user session information | CWebApplication |
viewPath | string | the root directory of view files. | CWebApplication |
viewRenderer | IViewRenderer | Returns the view renderer. | CWebApplication |
Method | Description | Defined By |
---|---|---|
__call() | Calls the named method which is not a class method. | CComponent |
__construct() | Constructor. | CApplication |
__get() | Getter magic method. | CModule |
__isset() | Checks if a property value is null. | CModule |
__set() | Sets value of a component property. | CComponent |
__unset() | Sets a component property to be null. | CComponent |
afterControllerAction() | The post-filter for controller actions. | CWebApplication |
asa() | Returns the named behavior object. | CComponent |
attachBehavior() | Attaches a behavior to this component. | CComponent |
attachBehaviors() | Attaches a list of behaviors to the component. | CComponent |
attachEventHandler() | Attaches an event handler to an event. | CComponent |
beforeControllerAction() | The pre-filter for controller actions. | CWebApplication |
canGetProperty() | Determines whether a property can be read. | CComponent |
canSetProperty() | Determines whether a property can be set. | CComponent |
clearGlobalState() | Clears a global value. | CApplication |
configure() | Configures the module with the specified configuration. | CModule |
createAbsoluteUrl() | Creates an absolute URL based on the given controller and action information. | CWebApplication |
createController() | Creates a controller instance based on a route. | CWebApplication |
createUrl() | Creates a relative URL based on the given controller and action information. | CWebApplication |
detachBehavior() | Detaches a behavior from the component. | CComponent |
detachBehaviors() | Detaches all behaviors from the component. | CComponent |
detachEventHandler() | Detaches an existing event handler. | CComponent |
disableBehavior() | Disables an attached behavior. | CComponent |
disableBehaviors() | Disables all behaviors attached to this component. | CComponent |
displayError() | Displays the captured PHP error. | CApplication |
displayException() | Displays the uncaught PHP exception. | CApplication |
enableBehavior() | Enables an attached behavior. | CComponent |
enableBehaviors() | Enables all behaviors attached to this component. | CComponent |
end() | Terminates the application. | CApplication |
findLocalizedFile() | Returns the localized version of a specified file. | CApplication |
findModule() | Searches for a module by its ID. | CWebApplication |
getAssetManager() | Returns the asset manager component | CWebApplication |
getAuthManager() | Returns the authorization manager component | CWebApplication |
getBasePath() | Returns the root directory of the application. Defaults to 'protected'. | CApplication |
getBaseUrl() | Returns the relative URL for the application. | CWebApplication |
getCache() | Returns the cache application component. Null if the component is not enabled. | CApplication |
getClientScript() | Returns the client script manager. | CWebApplication |
getComponent() | Retrieves the named application component. | CModule |
getComponents() | Returns the currently loaded components (indexed by their IDs) | CModule |
getController() | Returns the currently active controller | CWebApplication |
getControllerPath() | Returns the directory that contains the controller classes. Defaults to 'protected/controllers'. | CWebApplication |
getCoreMessages() | Returns the core message translations | CApplication |
getDateFormatter() | Returns the locale-dependent date formatter. The current application locale will be used. | CApplication |
getDb() | Returns the database connection | CApplication |
getErrorHandler() | Returns the error handler application component. | CApplication |
getEventHandlers() | Returns the list of attached event handlers for an event. | CComponent |
getExtensionPath() | Returns the root directory that holds all third-party extensions. | CApplication |
getGlobalState() | Returns a global value. | CApplication |
getHomeUrl() | Returns the homepage URL | CWebApplication |
getId() | Returns a unique identifier for the application. | CApplication |
getLanguage() | Returns the language that the user is using and the application should be targeted to. Defaults to the source language. | CApplication |
getLayoutPath() | Returns the root directory of layout files. Defaults to 'protected/views/layouts'. | CWebApplication |
getLocale() | Returns the locale instance | CApplication |
getMessages() | Returns the application message translations | CApplication |
getModule() | Retrieves the named application module. | CModule |
getModulePath() | Returns the directory that contains the application modules. Defaults to the 'modules' subdirectory of basePath. | CModule |
getModules() | Returns the configuration of the currently installed modules (module ID => configuration) | CModule |
getNumberFormatter() | Returns the locale-dependent number formatter. The current application locale will be used. | CApplication |
getParams() | Returns the list of user-defined parameters | CModule |
getParentModule() | Returns the parent module. Null if this module does not have a parent. | CModule |
getRequest() | Returns the request component | CApplication |
getRuntimePath() | Returns the directory that stores runtime files. Defaults to 'protected/runtime'. | CApplication |
getSecurityManager() | Returns the security manager application component. | CApplication |
getSession() | Returns the session component | CWebApplication |
getStatePersister() | Returns the state persister application component. | CApplication |
getSystemViewPath() | Returns the root directory of system view files. Defaults to 'protected/views/system'. | CWebApplication |
getTheme() | Returns the theme used currently. Null if no theme is being used. | CWebApplication |
getThemeManager() | Returns the theme manager. | CWebApplication |
getTimeZone() | Returns the time zone used by this application. | CApplication |
getUrlManager() | Returns the URL manager component | CApplication |
getUser() | Returns the user session information | CWebApplication |
getViewPath() | Returns the root directory of view files. Defaults to 'protected/views'. | CWebApplication |
getViewRenderer() | Returns the view renderer. | CWebApplication |
handleError() | Handles PHP execution errors such as warnings, notices. | CApplication |
handleException() | Handles uncaught PHP exceptions. | CApplication |
hasComponent() | Determines whether the named application component exists (including both loaded and disabled.) | CModule |
hasEvent() | Determines whether an event is defined. | CComponent |
hasEventHandler() | Checks whether the named event has attached handlers. | CComponent |
hasProperty() | Determines whether a property is defined. | CComponent |
onBeginRequest() | Raised right BEFORE the application processes the request. | CApplication |
onEndRequest() | Raised right AFTER the application processes the request. | CApplication |
onError() | Raised when a PHP execution error occurs. | CApplication |
onException() | Raised when an uncaught PHP exception occurs. | CApplication |
processRequest() | Processes the current request. | CWebApplication |
raiseEvent() | Raises an event. | CComponent |
run() | Runs the application. | CApplication |
runController() | Creates the controller and performs the specified action. | CWebApplication |
setAliases() | Defines the root aliases. | CModule |
setBasePath() | Sets the root directory of the application. | CApplication |
setComponent() | Puts a component under the management of the module. | CModule |
setComponents() | Sets the application components. | CModule |
setController() | Sets the currently active controller | CWebApplication |
setControllerPath() | Sets the directory that contains the controller classes. | CWebApplication |
setExtensionPath() | Sets the directory that contains all third-party extensions. | CApplication |
setGlobalState() | Sets a global value. | CApplication |
setHomeUrl() | Sets the homepage URL | CWebApplication |
setId() | Sets a unique identifier for the application. | CApplication |
setImport() | Sets the aliases that are used in the module. | CModule |
setLanguage() | Specifies which language the application is targeted to. | CApplication |
setLayoutPath() | Sets the root directory of layout files. | CWebApplication |
setModulePath() | Sets the directory that contains the application modules. | CModule |
setModules() | Configures the sub-modules of this module. | CModule |
setParams() | Sets user-defined parameters. This should be in name-value pairs. | CModule |
setRuntimePath() | Sets the directory that stores runtime files. | CApplication |
setSystemViewPath() | Sets the root directory of system view files. | CWebApplication |
setTheme() | Sets the theme name | CWebApplication |
setTimeZone() | Sets the time zone used by this application. | CApplication |
setViewPath() | Sets the root directory of view files. | CWebApplication |
Method | Description | Defined By |
---|---|---|
init() | Initializes the application. | CWebApplication |
initSystemHandlers() | Initializes the class autoloader and error handlers. | CApplication |
loadGlobalState() | Loads the global state data from persistent storage. | CApplication |
parseActionParams() | Parses a path info into an action ID and GET variables. | CWebApplication |
preinit() | Preinitializes the module. | CModule |
preloadComponents() | Loads static application components. | CModule |
registerCoreComponents() | Registers the core application components. | CWebApplication |
saveGlobalState() | Saves the global state data into persistent storage. | CApplication |
Event | Description | Defined By |
---|---|---|
onBeginRequest | Raised right BEFORE the application processes the request. | CApplication |
onEndRequest | Raised right AFTER the application processes the request. | CApplication |
onException | Raised when an uncaught PHP exception occurs. | CApplication |
onError | Raised when a PHP execution error occurs. | CApplication |
the asset manager component
the authorization manager component
Returns the relative URL for the application. This is a shortcut method to CHttpRequest::getBaseUrl().
the configuration specifying a controller which should handle all user requests. This is mainly used when the application is in maintenance mode and we should use a controller to handle all incoming requests. The configuration specifies the controller route (the first element) and GET parameters (the rest name-value pairs). For example,
array( 'offline/notice', 'param1'=>'value1', 'param2'=>'value2', )Defaults to null, meaning catch-all is not effective.
Returns the client script manager.
the currently active controller
mapping from controller ID to controller configurations. Each name-value pair specifies the configuration for a single controller. A controller configuration can be either a string or an array. If the former, the string should be the class name or class path alias of the controller. If the latter, the array must contain a 'class' element which specifies the controller's class name or class path alias. The rest name-value pairs in the array are used to initialize the corresponding controller properties. For example,
array( 'post'=>array( 'class'=>'path.to.PostController', 'pageTitle'=>'something new', ), 'user'=>'path.to.UserController',, )
the directory that contains the controller classes. Defaults to 'protected/controllers'.
the ID of the default controller. Defaults to 'site'.
the homepage URL
the application-wide layout. Defaults to 'main' (relative to layoutPath). If this is false, then no layout will be used.
the root directory of layout files. Defaults to 'protected/views/layouts'.
the session component
the root directory of system view files. Defaults to 'protected/views/system'.
the theme used currently. Null if no theme is being used.
the theme manager.
the user session information
the root directory of view files. Defaults to 'protected/views'.
Returns the view renderer. If this component is registered and enabled, the default view rendering logic defined in CBaseController will be replaced by this renderer.
public void afterControllerAction(CController $controller, CAction $action)
| ||
$controller | CController | the controller |
$action | CAction | the action |
public function afterControllerAction($controller,$action)
{
}
The post-filter for controller actions. This method is invoked after the currently requested controller action and all its filters are executed. You may override this method with logic that needs to be done after all controller actions.
public boolean beforeControllerAction(CController $controller, CAction $action)
| ||
$controller | CController | the controller |
$action | CAction | the action |
{return} | boolean | whether the action should be executed. |
public function beforeControllerAction($controller,$action)
{
return true;
}
The pre-filter for controller actions. This method is invoked before the currently requested controller action and all its filters are executed. You may override this method with logic that needs to be done before all controller actions.
public string createAbsoluteUrl(string $route, array $params=array (
), string $schema='', string $ampersand='&')
| ||
$route | string | the URL route. This should be in the format of 'ControllerID/ActionID'. |
$params | array | additional GET parameters (name=>value). Both the name and value will be URL-encoded. |
$schema | string | schema to use (e.g. http, https). If empty, the schema used for the current request will be used. |
$ampersand | string | the token separating name-value pairs in the URL. |
{return} | string | the constructed URL |
public function createAbsoluteUrl($route,$params=array(),$schema='',$ampersand='&')
{
return $this->getRequest()->getHostInfo($schema).$this->createUrl($route,$params,$ampersand);
}
Creates an absolute URL based on the given controller and action information.
public array createController(string $route, CWebModule $owner=NULL)
| ||
$route | string | the route of the request. |
$owner | CWebModule | the module that the new controller will belong to. Defaults to null, meaning the application instance is the owner. |
{return} | array | the controller instance and the action ID. Null if the controller class does not exist or the route is invalid. |
public function createController($route,$owner=null)
{
if($owner===null)
$owner=$this;
if(($route=trim($route,'/'))==='')
$route=$owner->defaultController;
$caseSensitive=$this->getUrlManager()->caseSensitive;
$route.='/';
while(($pos=strpos($route,'/'))!==false)
{
$id=substr($route,0,$pos);
if(!preg_match('/^\w+$/',$id))
return null;
if(!$caseSensitive)
$id=strtolower($id);
$route=(string)substr($route,$pos+1);
if(!isset($basePath)) // first segment
{
if(isset($owner->controllerMap[$id]))
{
return array(
Yii::createComponent($owner->controllerMap[$id],$id,$owner===$this?null:$owner),
$this->parseActionParams($route),
);
}
if(($module=$owner->getModule($id))!==null)
return $this->createController($route,$module);
$basePath=$owner->getControllerPath();
$controllerID='';
}
else
$controllerID.='/';
$className=ucfirst($id).'Controller';
$classFile=$basePath.DIRECTORY_SEPARATOR.$className.'.php';
if(is_file($classFile))
{
if(!class_exists($className,false))
require($classFile);
if(class_exists($className,false) && is_subclass_of($className,'CController'))
{
$id[0]=strtolower($id[0]);
return array(
new $className($controllerID.$id,$owner===$this?null:$owner),
$this->parseActionParams($route),
);
}
return null;
}
$controllerID.=$id;
$basePath.=DIRECTORY_SEPARATOR.$id;
}
}
Creates a controller instance based on a route.
The route should contain the controller ID and the action ID.
It may also contain additional GET variables. All these must be concatenated together with slashes.
This method will attempt to create a controller in the following order:
public string createUrl(string $route, array $params=array (
), string $ampersand='&')
| ||
$route | string | the URL route. This should be in the format of 'ControllerID/ActionID'. |
$params | array | additional GET parameters (name=>value). Both the name and value will be URL-encoded. |
$ampersand | string | the token separating name-value pairs in the URL. |
{return} | string | the constructed URL |
public function createUrl($route,$params=array(),$ampersand='&')
{
return $this->getUrlManager()->createUrl($route,$params,$ampersand);
}
Creates a relative URL based on the given controller and action information.
public CWebModule findModule(string $id)
| ||
$id | string | module ID |
{return} | CWebModule | the module that has the specified ID. Null if no module is found. |
public function findModule($id)
{
if(($controller=$this->getController())!==null && ($module=$controller->getModule())!==null)
{
do
{
if(($m=$module->getModule($id))!==null)
return $m;
} while(($module=$module->getParentModule())!==null);
}
if(($m=$this->getModule($id))!==null)
return $m;
}
Searches for a module by its ID. This method is used internally. Do not call this method.
public CAssetManager getAssetManager()
| ||
{return} | CAssetManager | the asset manager component |
public function getAssetManager()
{
return $this->getComponent('assetManager');
}
public IAuthManager getAuthManager()
| ||
{return} | IAuthManager | the authorization manager component |
public function getAuthManager()
{
return $this->getComponent('authManager');
}
public string getBaseUrl(boolean $absolute=false)
| ||
$absolute | boolean | whether to return an absolute URL. Defaults to false, meaning returning a relative one. This parameter has been available since 1.0.2. |
{return} | string | the relative URL for the application |
public function getBaseUrl($absolute=false)
{
return $this->getRequest()->getBaseUrl($absolute);
}
Returns the relative URL for the application. This is a shortcut method to CHttpRequest::getBaseUrl().
public CClientScript getClientScript()
| ||
{return} | CClientScript | the client script manager |
public function getClientScript()
{
return $this->getComponent('clientScript');
}
Returns the client script manager.
public CController getController()
| ||
{return} | CController | the currently active controller |
public function getController()
{
return $this->_controller;
}
public string getControllerPath()
| ||
{return} | string | the directory that contains the controller classes. Defaults to 'protected/controllers'. |
public function getControllerPath()
{
if($this->_controllerPath!==null)
return $this->_controllerPath;
else
return $this->_controllerPath=$this->getBasePath().DIRECTORY_SEPARATOR.'controllers';
}
public string getHomeUrl()
| ||
{return} | string | the homepage URL |
public function getHomeUrl()
{
if($this->_homeUrl===null)
{
if($this->getUrlManager()->showScriptName)
return $this->getRequest()->getScriptUrl();
else
return $this->getRequest()->getBaseUrl().'/';
}
else
return $this->_homeUrl;
}
public string getLayoutPath()
| ||
{return} | string | the root directory of layout files. Defaults to 'protected/views/layouts'. |
public function getLayoutPath()
{
if($this->_layoutPath!==null)
return $this->_layoutPath;
else
return $this->_layoutPath=$this->getViewPath().DIRECTORY_SEPARATOR.'layouts';
}
public CHttpSession getSession()
| ||
{return} | CHttpSession | the session component |
public function getSession()
{
return $this->getComponent('session');
}
public string getSystemViewPath()
| ||
{return} | string | the root directory of system view files. Defaults to 'protected/views/system'. |
public function getSystemViewPath()
{
if($this->_systemViewPath!==null)
return $this->_systemViewPath;
else
return $this->_systemViewPath=$this->getViewPath().DIRECTORY_SEPARATOR.'system';
}
public CTheme getTheme()
| ||
{return} | CTheme | the theme used currently. Null if no theme is being used. |
public function getTheme()
{
if(is_string($this->_theme))
$this->_theme=$this->getThemeManager()->getTheme($this->_theme);
return $this->_theme;
}
public CThemeManager getThemeManager()
| ||
{return} | CThemeManager | the theme manager. |
public function getThemeManager()
{
return $this->getComponent('themeManager');
}
public CWebUser getUser()
| ||
{return} | CWebUser | the user session information |
public function getUser()
{
return $this->getComponent('user');
}
public string getViewPath()
| ||
{return} | string | the root directory of view files. Defaults to 'protected/views'. |
public function getViewPath()
{
if($this->_viewPath!==null)
return $this->_viewPath;
else
return $this->_viewPath=$this->getBasePath().DIRECTORY_SEPARATOR.'views';
}
public IViewRenderer getViewRenderer()
| ||
{return} | IViewRenderer | the view renderer. |
public function getViewRenderer()
{
return $this->getComponent('viewRenderer');
}
Returns the view renderer. If this component is registered and enabled, the default view rendering logic defined in CBaseController will be replaced by this renderer.
protected void init()
|
protected function init()
{
parent::init();
// preload 'request' so that it has chance to respond to onBeginRequest event.
$this->getRequest();
}
Initializes the application. This method overrides the parent implementation by preloading the 'request' component.
protected string parseActionParams(string $pathInfo)
| ||
$pathInfo | string | path info |
{return} | string | action ID |
protected function parseActionParams($pathInfo)
{
if(($pos=strpos($pathInfo,'/'))!==false)
{
CUrlManager::parsePathInfo((string)substr($pathInfo,$pos+1));
$actionID=substr($pathInfo,0,$pos);
return $this->getUrlManager()->caseSensitive ? $actionID : strtolower($actionID);
}
else
return $pathInfo;
}
Parses a path info into an action ID and GET variables.
public void processRequest()
|
public function processRequest()
{
if(is_array($this->catchAllRequest) && isset($this->catchAllRequest[0]))
{
$route=$this->catchAllRequest[0];
foreach(array_splice($this->catchAllRequest,1) as $name=>$value)
$_GET[$name]=$value;
}
else
$route=$this->getUrlManager()->parseUrl($this->getRequest());
$this->runController($route);
}
Processes the current request. It first resolves the request into controller and action, and then creates the controller to perform the action.
protected void registerCoreComponents()
|
protected function registerCoreComponents()
{
parent::registerCoreComponents();
$components=array(
'session'=>array(
'class'=>'CHttpSession',
),
'assetManager'=>array(
'class'=>'CAssetManager',
),
'user'=>array(
'class'=>'CWebUser',
),
'themeManager'=>array(
'class'=>'CThemeManager',
),
'authManager'=>array(
'class'=>'CPhpAuthManager',
),
'clientScript'=>array(
'class'=>'CClientScript',
),
);
$this->setComponents($components);
}
Registers the core application components. This method overrides the parent implementation by registering additional core components.
public void runController(string $route)
| ||
$route | string | the route of the current request. See createController for more details. |
public function runController($route)
{
if(($ca=$this->createController($route))!==null)
{
list($controller,$actionID)=$ca;
$oldController=$this->_controller;
$this->_controller=$controller;
$controller->init();
$controller->run($actionID);
$this->_controller=$oldController;
}
else
throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
array('{route}'=>$route===''?$this->defaultController:$route)));
}
Creates the controller and performs the specified action.
public void setController(CController $value)
| ||
$value | CController | the currently active controller |
public function setController($value)
{
$this->_controller=$value;
}
public void setControllerPath(string $value)
| ||
$value | string | the directory that contains the controller classes. |
public function setControllerPath($value)
{
if(($this->_controllerPath=realpath($value))===false || !is_dir($this->_controllerPath))
throw new CException(Yii::t('yii','The controller path "{path}" is not a valid directory.',
array('{path}'=>$value)));
}
public void setHomeUrl(string $value)
| ||
$value | string | the homepage URL |
public function setHomeUrl($value)
{
$this->_homeUrl=$value;
}
public void setLayoutPath(string $path)
| ||
$path | string | the root directory of layout files. |
public function setLayoutPath($path)
{
if(($this->_layoutPath=realpath($path))===false || !is_dir($this->_layoutPath))
throw new CException(Yii::t('yii','The layout path "{path}" is not a valid directory.',
array('{path}'=>$path)));
}
public void setSystemViewPath(string $path)
| ||
$path | string | the root directory of system view files. |
public function setSystemViewPath($path)
{
if(($this->_systemViewPath=realpath($path))===false || !is_dir($this->_systemViewPath))
throw new CException(Yii::t('yii','The system view path "{path}" is not a valid directory.',
array('{path}'=>$path)));
}
public void setTheme(string $value)
| ||
$value | string | the theme name |
public function setTheme($value)
{
$this->_theme=$value;
}
public void setViewPath(string $path)
| ||
$path | string | the root directory of view files. |
public function setViewPath($path)
{
if(($this->_viewPath=realpath($path))===false || !is_dir($this->_viewPath))
throw new CException(Yii::t('yii','The view path "{path}" is not a valid directory.',
array('{path}'=>$path)));
}
Signup or Login in order to comment.