Object Class Reference

Public Member Functions | |
| _persist ($name, $return=null, &$object, $type=null) | |
| _savePersistent ($name, &$object) | |
| _set ($properties=array()) | |
| _stop ($status=0) | |
| cakeError ($method, $messages=array()) | |
| dispatchMethod ($method, $params=array()) | |
| log ($msg, $type=LOG_ERROR) | |
| Object () | |
| requestAction ($url, $extra=array()) | |
| toString () | |
Public Attributes | |
| $_log = null | |
Detailed Description
Definition at line 39 of file object.php.
Member Function Documentation
| Object::_persist | ( | $ | name, | |
| $ | return = null, |
|||
| &$ | object, | |||
| $ | type = null | |||
| ) |
Checks 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:
-
string $name name of the class to persist string $object the object to persist
- Returns:
- boolean Success protected
- Todo:
- add examples to manual
Definition at line 215 of file object.php.
References $file, and _savePersistent().
Referenced by Controller::loadModel().
| Object::_savePersistent | ( | $ | name, | |
| &$ | object | |||
| ) |
You should choose a unique name for the persistent file
There are many uses for this method, see manual for examples
- Parameters:
-
string $name name used for object to cache object $object the object to persist
- Returns:
- true on save, throws error if file can not be created protected
Definition at line 243 of file object.php.
References $file, and cache().
Referenced by _persist().
| Object::_set | ( | $ | properties = array() |
) |
Allows setting of multiple properties of the object in a single line of code.
- Parameters:
-
array $properties An associative array containing properties and corresponding values. protected
Definition at line 165 of file object.php.
Referenced by CookieComponent::initialize().
| Object::_stop | ( | $ | status = 0 |
) |
Stop execution of the current script
- Parameters:
-
$status see http://php.net/exit for values
- Returns:
- void public
Definition at line 137 of file object.php.
Referenced by AjaxHelper::afterRender(), BakeShell::all(), Dispatcher::dispatch(), SchemaShell::dump(), ErrorHandler::error(), ErrorHandler::error404(), PluginTask::execute(), ExtractTask::execute(), DbConfigTask::execute(), SchemaShell::generate(), ControllerTask::getName(), ViewTask::help(), ProjectTask::help(), PluginTask::help(), ControllerTask::help(), SchemaShell::help(), ControllerTask::listAll(), BakeShell::loadTasks(), ApiShell::main(), ErrorHandler::missingAction(), ErrorHandler::missingComponentClass(), ErrorHandler::missingComponentFile(), ErrorHandler::missingConnection(), ErrorHandler::missingController(), ErrorHandler::missingDatabase(), ErrorHandler::missingHelperClass(), ErrorHandler::missingHelperFile(), ErrorHandler::missingLayout(), ErrorHandler::missingModel(), ErrorHandler::missingTable(), ErrorHandler::missingView(), ErrorHandler::privateAction(), Controller::redirect(), SchemaShell::run(), AuthComponent::startup(), AclShell::startup(), and SchemaShell::view().
| Object::cakeError | ( | $ | method, | |
| $ | messages = array() | |||
| ) |
Used to report user friendly errors. If there is a file app/error.php this file will be loaded error.php is the AppError class it should extend ErrorHandler class.
- Parameters:
-
string $method Method to be called in the error class (AppError or ErrorHandler classes) array $messages Message that is to be displayed by the error class
- Returns:
- error message public
Definition at line 185 of file object.php.
References App::import().
Referenced by Component::_loadComponents(), Dispatcher::dispatch(), Controller::loadModel(), Model::setDataSource(), and Model::setSource().
| Object::dispatchMethod | ( | $ | method, | |
| $ | params = array() | |||
| ) |
Calls 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:
-
string $method Name of the method to call array $params Parameter list to use when calling $method
- Returns:
- mixed Returns the result of the method call public
Definition at line 111 of file object.php.
Referenced by Model::invalidFields().
| Object::log | ( | $ | msg, | |
| $ | type = LOG_ERROR | |||
| ) |
API for logging events.
- Parameters:
-
string $msg Log message integer $type Error type constant. Defined in app/config/core.php. public
Reimplemented in Debugger.
Definition at line 147 of file object.php.
References uses().
| Object::Object | ( | ) |
A 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()
- Returns:
- Object
Definition at line 55 of file object.php.
| Object::requestAction | ( | $ | url, | |
| $ | extra = array() | |||
| ) |
Calls a controller's method from any location.
- Parameters:
-
string $url URL in the form of Cake URL ("/controller/method/parameter") array $extra if array includes the key "return" it sets the AutoRender to true.
- Returns:
- mixed Success (true/false) or contents if 'return' is set in $extra public
Definition at line 87 of file object.php.
| Object::toString | ( | ) |
Object-to-string conversion. Each class can override this method as necessary.
- Returns:
- string The name of this class public
Definition at line 75 of file object.php.
Referenced by Xml::compose().
Member Data Documentation
| Object::$_log = null |
Definition at line 46 of file object.php.
The documentation for this class was generated from the following file:
- 1.2.x.x/cake/libs/object.php