[ Index ] |
|
Code source de CakePHP 1.1.13.4450 |
[Code source] [Imprimer] [Statistiques]
Object class, allowing __construct and __destruct in PHP4. Also includes methods for logging and the special method RequestAction, to call other Controllers' Actions from anywhere.
Copyright: | Copyright 2005-2007, Cake Software Foundation, Inc. |
License: | http://www.opensource.org/licenses/mit-license.php The MIT License |
Version: | $Revision: 4409 $ |
Poids: | 259 lignes (7 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 1 fichier cake/libs/error.php |
Object:: (9 méthodes):
Object()
__construct()
toString()
requestAction()
log()
cakeError()
_persist()
_savePersistent()
__openPersistent()
Object() X-Ref |
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() return: Object |
__construct() X-Ref |
Class constructor, overridden in descendant classes. |
toString() X-Ref |
Object-to-string conversion. Each class can override this method as necessary. return: string The name of this class |
requestAction($url, $extra = array() X-Ref |
Calls a controller's method from any location. Allows for controllers to communicate with each other. param: string $url URL in the form of Cake URL ("/controller/method/parameter") param: array $extra If array includes the key "return" it sets the AutoRender to true. return: boolean Success |
log($msg, $type = LOG_ERROR) X-Ref |
API for logging events. param: string $msg Log message param: int $type Error type constant. Defined in app/config/core.php. |
cakeError($method, $messages) X-Ref |
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. param: string $method Method to be called in the error class (AppError or ErrorHandler classes) param: array $messages Message that is to be displayed by the error class return: error message |
_persist($name, $return = null, &$object, $type = null) X-Ref |
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 param: string $name name of class to persist param: boolean $return param: object $object param: string $type return: boolean |
_savePersistent($name, &$object) X-Ref |
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 param: string $name name used for object to cache param: object $object the object to persist return: true on save, throws error if file can not be created |
__openPersistent($name, $type = null) X-Ref |
Open the persistent class file for reading Used by Object::_persist(), part of the cache system param: string $name Name of the persistant file param: string $type |
Généré le : Sun Feb 25 19:27:47 2007 | par Balluche grâce à PHPXref 0.7 |