Object Class Reference

Public Member Functions | |
| _persist ($name, $return=null, &$object, $type=null) | |
| _savePersistent ($name, &$object) | |
| cakeError ($method, $messages) | |
| 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
There are many uses for this method, see manual for examples also art of the cache system
- Parameters:
-
string $name name of class to persist boolean $return object $object string $type
- Returns:
- boolean
- Todo:
- add examples to manual protected
Definition at line 188 of file object.php.
References $file, and _savePersistent().
Referenced by Controller::constructClasses().
| 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 also part of the cache system
- 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 217 of file object.php.
Referenced by _persist().
| Object::cakeError | ( | $ | method, | |
| $ | messages | |||
| ) |
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 158 of file object.php.
Referenced by Controller::constructClasses(), Dispatcher::dispatch(), and Model::setSource().
| Object::log | ( | $ | msg, | |
| $ | type = LOG_ERROR | |||
| ) |
API for logging events.
- Parameters:
-
string $msg Log message int $type Error type constant. Defined in app/config/core.php.
Definition at line 123 of file object.php.
Referenced by Dispatcher::dispatch().
| 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 public
Definition at line 56 of file object.php.
References $args.
| Object::requestAction | ( | $ | url, | |
| $ | extra = array() | |||
| ) |
Calls a controller's method from any location. Allows for controllers to communicate with each other.
- 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:
- boolean Success public
Definition at line 92 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 79 of file object.php.
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:
- /cake_1.1.19.6305/cake/libs/object.php