ErrorHandler Class Info:
- Class Declaration:
- class ErrorHandler extends Object
- File name:
- cake/console/error.php
- Summary:
- Error Handler for Cake console.
- Class Inheritance
- package
- cake
- subpackage
- cake.cake.console
Properties:
Show/Hide parent properties
| protected | _log | Log object |
| public | stderr | Standard error stream. |
| public | stdout | Standard output stream. |
Method Summary:
Show/Hide parent methods
cakeError
topUsed to report user friendly errors.
If there is a file app/error.php or app/app_error.php this file will be loaded
error.php is the AppError class it should extend ErrorHandler class.
- Parameters:
-
$method string Method to be called in the error class (AppError or ErrorHandler classes) required (no default) $messages array Message that is to be displayed by the error class optional array ( ) - Method defined in class:
- Object
- Method defined in file:
- cake/libs/object.php on line 189
- return
- error message
- access
- public
__construct
topClass constructor.
- Parameters:
-
$method string Method dispatching an error required (no default) $messages array Error messages required (no default) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 54
dispatchMethod
topCalls a method on this object with the given parameters. Provides an OO wrapper
for call_user_func_array, and improves performance by using straight method calls
in most cases.
- Parameters:
-
$method string Name of the method to call required (no default) $params array Parameter list to use when calling $method optional array ( ) - Method defined in class:
- Object
- Method defined in file:
- cake/libs/object.php on line 113
- return
- mixed Returns the result of the method call
- access
- public
error
topDisplays an error page (e.g. 404 Not found).
- Parameters:
-
$params array Parameters (code, name, and message) required (no default) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 69
- access
- public
error404
topConvenience method to display a 404 page.
- Parameters:
-
$params array Parameters (url, message) required (no default) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 80
- access
- public
log
topAPI for logging events.
- Parameters:
-
$msg string Log message required (no default) $type integer Error type constant. Defined in app/config/core.php. optional 2 - Method defined in class:
- Object
- Method defined in file:
- cake/libs/object.php on line 150
- return
- boolean Success of log write
- access
- public
missingAction
topRenders the Missing Action web page.
- Parameters:
-
$params array Parameters (action, className) required (no default) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 105
- access
- public
missingComponentClass
topRenders the Missing Component class web page.
- Parameters:
-
$params array Parameters (file, component) required (no default) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 214
- access
- public
missingComponentFile
topRenders the Missing Component file web page.
- Parameters:
-
$params array Parameters (file, component) required (no default) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 203
- access
- public
missingConnection
topRenders the Database Connection web page.
- Parameters:
-
$params array Parameters required (no default) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 170
- access
- public
missingController
topRenders the Missing Controller web page.
- Parameters:
-
$params array Parameters (className) required (no default) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 93
- access
- public
missingDatabase
topRenders the Missing Database web page.
- Parameters:
-
$params array Parameters optional array ( ) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 138
- access
- public
missingHelperClass
topRenders the Missing Helper class web page.
- Parameters:
-
$params array Parameters (file, helper) required (no default) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 192
- access
- public
missingHelperFile
topRenders the Missing Helper file web page.
- Parameters:
-
$params array Parameters (file, helper) required (no default) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 181
- access
- public
missingLayout
topRenders the Missing Layout web page.
- Parameters:
-
$params array Parameters (file) required (no default) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 159
- access
- public
missingModel
topRenders the Missing Model class web page.
- Parameters:
-
$params array Parameters (className) required (no default) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 225
- access
- public
missingTable
topRenders the Missing Table web page.
- Parameters:
-
$params array Parameters (table, className) required (no default) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 127
- access
- public
missingView
topRenders the Missing View web page.
- Parameters:
-
$params array Parameters (file, action, className) required (no default) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 148
- access
- public
Object
topA hack to support __construct() on PHP 4
Hint: descendant classes have no PHP4 class_name() constructors,
so this constructor gets called first and calls the top-layer __construct()
which (if present) should call parent::__construct()
- Method defined in class:
- Object
- Method defined in file:
- cake/libs/object.php on line 53
- return
- Object
_persist
topChecks for a persistent class file, if found file is opened and true returned
If file is not found a file is created and false returned
If used in other locations of the model you should choose a unique name for the persistent file
There are many uses for this method, see manual for examples
- Parameters:
-
$name string name of the class to persist required (no default) $return required (no default) $object string the object to persist required (no default) $type optional NULL - Method defined in class:
- Object
- Method defined in file:
- cake/libs/object.php on line 219
- return
- boolean Success
- access
- protected
- todo
- add examples to manual
privateAction
topRenders the Private Action web page.
- Parameters:
-
$params array Parameters (action, className) required (no default) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 116
- access
- public
requestAction
topCalls a controller's method from any location.
- Parameters:
-
$url mixed String or array-based url. required (no default) $extra array if array includes the key "return" it sets the AutoRender to true. optional array ( ) - Method defined in class:
- Object
- Method defined in file:
- cake/libs/object.php on line 86
- return
- mixed Boolean true or false on success/failure, or contents of rendered action if 'return' is set in $extra.
- access
- public
_savePersistent
topYou should choose a unique name for the persistent file
There are many uses for this method, see manual for examples
- Parameters:
-
$name string name used for object to cache required (no default) $object object the object to persist required (no default) - Method defined in class:
- Object
- Method defined in file:
- cake/libs/object.php on line 247
- return
- boolean true on save, throws error if file can not be created
- access
- protected
_set
topAllows setting of multiple properties of the object in a single line of code.
- Parameters:
-
$properties array An associative array containing properties and corresponding values. optional array ( ) - Method defined in class:
- Object
- Method defined in file:
- cake/libs/object.php on line 169
- return
- void
- access
- protected
stderr
topOutputs to the stderr filehandle.
- Parameters:
-
$string string Error text to output. required (no default) - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 250
- access
- public
stdout
topOutputs to the stdout filehandle.
- Parameters:
-
$string string String to output. required (no default) $newline boolean If true, the outputs gets an added newline. optional true - Method defined in class:
- ErrorHandler
- Method defined in file:
- cake/console/error.php on line 237
- access
- public
_stop
topStop execution of the current script
- Parameters:
-
$status optional 0 - Method defined in class:
- Object
- Method defined in file:
- cake/libs/object.php on line 139
- return
- void
- access
- public
toString
topObject-to-string conversion.
Each class can override this method as necessary.
- Method defined in class:
- Object
- Method defined in file:
- cake/libs/object.php on line 73
- return
- string The name of this class
- access
- public