Fatal error uncaught cexception with property cwebapplication.pagetitle

fatal error uncaught cexception with property cwebapplication.pagetitle

error-handling methods to help get your Yii applications production-ready. What you need for this book. The following software are required for this book. com/questions/769319/how-to-detect-a-property-return-type-in-objective-c -7-net-excel-saveas-error-exception-from-hresult-0x800a03ec 2015-09-01. Yii converts all non-fatal application errors to CException The most useful property is pageTitle which refers to the current page title.

Fatal error uncaught cexception with property cwebapplication.pagetitle - consider

Events

CWebApplication extends CApplication by providing functionalities specific to Web requests.

CWebApplication manages the controllers in MVC pattern, and provides the following additional core application components:
  • urlManager: provides URL parsing and constructing functionality;
  • request: encapsulates the Web request information;
  • session: provides the session-related functionalities;
  • assetManager: manages the publishing of private asset files.
  • user: represents the user session information.
  • themeManager: manages themes.
  • authManager: manages role-based access control (RBAC).
  • clientScript: manages client scripts (javascripts and CSS).
  • widgetFactory: creates widgets and supports widget skinning.


User requests are resolved as controller-action pairs and additional parameters. CWebApplication creates the requested controller instance and let it to handle the actual user request. If the user does not specify controller ID, it will assume defaultControlleris requested (which defaults to 'site').

Controller class files must reside under the directory controllerPath(defaults to 'protected/controllers'). The file name and the class name must be the same as the controller ID with the first letter in upper case and appended with 'Controller'. For example, the controller 'article' is defined by the class 'ArticleController' which is in the file 'protected/controllers/ArticleController.php'.

Property Details

public CAssetManagergetAssetManager()

the asset manager component

public IAuthManagergetAuthManager()

the authorization manager component

public array $catchAllRequest;

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.

public CClientScriptgetClientScript()

Returns the client script manager.

public CControllergetController()
public void setController(CController $value)

the currently active controller

public array $controllerMap;

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', )

Note, when processing an incoming request, the controller map will first be checked to see if the request can be handled by one of the controllers in the map. If not, a controller will be searched for under the default controller path.

public string $controllerNamespace;

Namespace that should be used when loading controllers. Default is to use global namespace.

public string getControllerPath()
public void setControllerPath(string $value)

the directory that contains the controller classes. Defaults to 'protected/controllers'.

public string $defaultController;

the route of the default controller, action or module. Defaults to 'site'.

public mixed $layout;

the application-wide layout. Defaults to 'main' (relative to layoutPath). If this is false, then no layout will be used.

public string getLayoutPath()
public void setLayoutPath(string $path)

the root directory of layout files. Defaults to 'protected/views/layouts'.

public CHttpSessiongetSession()

the session component

public string getSystemViewPath()
public void setSystemViewPath(string $path)

the root directory of system view files. Defaults to 'protected/views/system'.

public CThemegetTheme()
public void setTheme(string $value)

the theme used currently. Null if no theme is being used.

public CThemeManagergetThemeManager()

the theme manager.

public CWebUsergetUser()

the user session information

public string getViewPath()
public void setViewPath(string $path)

the root directory of view files. Defaults to 'protected/views'.

public IViewRenderergetViewRenderer()

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 IWidgetFactorygetWidgetFactory()

Returns the widget factory.

Method Details

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)

$controllerCControllerthe controller
$actionCActionthe action
{return}booleanwhether the action should be executed.

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 array createController(string $route, CWebModule $owner=NULL)

$routestringthe route of the request.
$ownerCWebModulethe module that the new controller will belong to. Defaults to null, meaning the application instance is the owner.
{return}arraythe controller instance and the action ID. Null if the controller class does not exist or the route is invalid.
Source Code:framework/web/CWebApplication.php#310(show)

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:

  1. If the first segment is found in controllerMap, the corresponding controller configuration will be used to create the controller;
  2. If the first segment is found to be a module ID, the corresponding module will be used to create the controller;
  3. Otherwise, it will search under the controllerPath to create the corresponding controller. For example, if the route is "admin/user/create", then the controller will be created using the class file "protected/controllers/admin/UserController.php".

public CWebModulefindModule(string $id)

$idstringmodule ID
{return}CWebModulethe module that has the specified ID. Null if no module is found.
Source Code:framework/web/CWebApplication.php#523(show)

Do not call this method. This method is used internally to search for a module by its ID.

Returns the client script manager.

public string getControllerPath()

{return}stringthe directory that contains the controller classes. Defaults to 'protected/controllers'.
Source Code:framework/web/CWebApplication.php#407(show)

public string getLayoutPath()

{return}stringthe root directory of layout files. Defaults to 'protected/views/layouts'.
Source Code:framework/web/CWebApplication.php#473(show)

public string getSystemViewPath()

{return}stringthe root directory of system view files. Defaults to 'protected/views/system'.
Source Code:framework/web/CWebApplication.php#451(show)

public CThemegetTheme()

{return}CThemethe theme used currently. Null if no theme is being used.
Source Code:framework/web/CWebApplication.php#254(show)

public string getViewPath()

{return}stringthe root directory of view files. Defaults to 'protected/views'.
Source Code:framework/web/CWebApplication.php#429(show)

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.

Returns the widget factory.

Source Code:framework/web/CWebApplication.php#541(show)

Initializes the application. This method overrides the parent implementation by preloading the 'request' component.

protected string parseActionParams(string $pathInfo)

$pathInfostringpath info
{return}stringaction ID
Source Code:framework/web/CWebApplication.php#375(show)

Parses a path info into an action ID and GET variables.

public void processRequest()

Source Code:framework/web/CWebApplication.php#131(show)

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()

Source Code:framework/web/CWebApplication.php#149(show)

Registers the core application components. This method overrides the parent implementation by registering additional core components.

public void runController(string $route)

$routestringthe route of the current request. See createController for more details.
Source Code:framework/web/CWebApplication.php#274(show)

Creates the controller and performs the specified action.

public void setControllerPath(string $value)

$valuestringthe directory that contains the controller classes.
Source Code:framework/web/CWebApplication.php#419(show)

public void setLayoutPath(string $path)

$pathstringthe root directory of layout files.
Source Code:framework/web/CWebApplication.php#485(show)

public void setSystemViewPath(string $path)

$pathstringthe root directory of system view files.
Source Code:framework/web/CWebApplication.php#463(show)

public void setTheme(string $value)

$valuestringthe theme name

public void setViewPath(string $path)

$pathstringthe root directory of view files.
Source Code:framework/web/CWebApplication.php#441(show)