diff --git a/cake/libs/cache.php b/cake/libs/cache.php index b4138f734..7d560f798 100644 --- a/cake/libs/cache.php +++ b/cake/libs/cache.php @@ -68,6 +68,7 @@ class Cache extends Object { * * @return object * @access public + * @static */ function &getInstance() { static $instance = array(); @@ -97,6 +98,7 @@ class Cache extends Object { * @param array $settings Optional associative array of settings passed to the engine * @return array(engine, settings) on success, false on failure * @access public + * @static */ function config($name = null, $settings = array()) { $_this =& Cache::getInstance(); @@ -142,6 +144,7 @@ class Cache extends Object { * @param array $settings Optional associative array of settings passed to the engine * @return boolean True on success, false on failure * @access public + * @static */ function engine($name = 'File', $settings = array()) { if (!$name || Configure::read('Cache.disable')) { @@ -172,8 +175,9 @@ class Cache extends Object { * * @param mixed $settings Optional string for simple name-value pair or array * @param string $value Optional for a simple name-value pair - * @return void + * @return array of settings * @access public + * @static */ function set($settings = array(), $value = null) { $_this =& Cache::getInstance(); @@ -207,7 +211,9 @@ class Cache extends Object { * * Permanently remove all expired and deleted data * + * @return void * @access public + * @static */ function gc() { $_this =& Cache::getInstance(); @@ -224,6 +230,7 @@ class Cache extends Object { * or array('config' => 'string configuration name', 'duration' => 'duration for expiration') * @return boolean True if the data was successfully cached, false on failure * @access public + * @static */ function write($key, $value, $config = null) { $_this =& Cache::getInstance(); @@ -280,6 +287,7 @@ class Cache extends Object { * @param string $config name of the configuration to use * @return mixed The cached data, or false if the data doesn't exist, has expired, or if there was an error fetching it * @access public + * @static */ function read($key, $config = null) { $_this =& Cache::getInstance(); @@ -315,6 +323,7 @@ class Cache extends Object { * @param string $config name of the configuration to use * @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed * @access public + * @static */ function delete($key, $config = null) { $_this =& Cache::getInstance(); @@ -348,6 +357,7 @@ class Cache extends Object { * @param string $config name of the configuration to use * @return boolean True if the cache was succesfully cleared, false otherwise * @access public + * @static */ function clear($check = false, $config = null) { $_this =& Cache::getInstance(); @@ -376,6 +386,7 @@ class Cache extends Object { * @param string $config Name of the configuration setting * @return bool * @access public + * @static */ function isInitialized($engine = null) { if (Configure::read('Cache.disable')) { @@ -394,6 +405,7 @@ class Cache extends Object { * @param string $engine Name of the engine * @return array list of settings for this engine * @access public + * @static */ function settings($engine = null) { $_this =& Cache::getInstance(); diff --git a/cake/libs/cake_log.php b/cake/libs/cake_log.php index 509789067..76cafbd8f 100644 --- a/cake/libs/cake_log.php +++ b/cake/libs/cake_log.php @@ -64,6 +64,7 @@ class CakeLog { * @param string $msg Message to log * @return boolean Success * @access public + * @static */ function write($type, $msg) { if (!defined('LOG_ERROR')) { diff --git a/cake/libs/class_registry.php b/cake/libs/class_registry.php index 45b7307eb..d076caa8e 100644 --- a/cake/libs/class_registry.php +++ b/cake/libs/class_registry.php @@ -86,6 +86,8 @@ class ClassRegistry { * * @param string $type TypeOfClass * @return object intance of ClassName + * @access public + * @static */ function &init($class, $type = null) { $_this =& ClassRegistry::getInstance(); @@ -171,6 +173,7 @@ class ClassRegistry { * @param mixed $object Object to store * @return boolean True if the object was written, false if $key already exists * @access public + * @static */ function addObject($key, &$object) { $_this =& ClassRegistry::getInstance(); @@ -185,7 +188,9 @@ class ClassRegistry { * Remove object which corresponds to given key. * * @param string $key Key of object to remove from registry + * @return void * @access public + * @static */ function removeObject($key) { $_this =& ClassRegistry::getInstance(); @@ -200,6 +205,7 @@ class ClassRegistry { * @param string $key Key to look for * @return boolean true if key exists in registry, false otherwise * @access public + * @static */ function isKeySet($key) { $_this =& ClassRegistry::getInstance(); @@ -216,6 +222,7 @@ class ClassRegistry { * * @return array Set of keys stored in registry * @access public + * @static */ function keys() { $_this =& ClassRegistry::getInstance(); @@ -227,6 +234,7 @@ class ClassRegistry { * @param string $key Key of object to look for * @return mixed Object stored in registry * @access public + * @static */ function &getObject($key) { $_this =& ClassRegistry::getInstance(); @@ -243,7 +251,7 @@ class ClassRegistry { return $return; } -/* +/** * Sets the default constructor parameter for an object type * * @param string $type Type of object. If this parameter is omitted, defaults to "Model" @@ -251,6 +259,8 @@ class ClassRegistry { * of $type are created * @return mixed Void if $param is being set. Otherwise, if only $type is passed, returns * the previously-set value of $param, or null if not set. + * @access public + * @static */ function config($type, $param = array()) { $_this =& ClassRegistry::getInstance(); @@ -272,6 +282,8 @@ class ClassRegistry { * @param string $alias * @param string $class * @return boolean + * @access protected + * @static */ function &_duplicate($alias, $class) { $_this =& ClassRegistry::getInstance(); @@ -291,6 +303,7 @@ class ClassRegistry { * @param string $key Key to include in map * @param string $name Key that is being mapped * @access public + * @static */ function map($key, $name) { $_this =& ClassRegistry::getInstance(); @@ -305,6 +318,7 @@ class ClassRegistry { * * @return array Keys of registry's map * @access public + * @static */ function mapKeys() { $_this =& ClassRegistry::getInstance(); @@ -316,6 +330,7 @@ class ClassRegistry { * @param string $key Key to find in map * @return string Mapped value * @access private + * @static */ function __getMap($key) { $_this =& ClassRegistry::getInstance(); @@ -326,7 +341,9 @@ class ClassRegistry { /** * Flushes all objects from the ClassRegistry. * + * @return void * @access public + * @static */ function flush() { $_this =& ClassRegistry::getInstance(); diff --git a/cake/libs/configure.php b/cake/libs/configure.php index 2b3206753..f74258205 100644 --- a/cake/libs/configure.php +++ b/cake/libs/configure.php @@ -242,6 +242,7 @@ class Configure extends Object { * * @param array $config Name of var to write * @param mixed $value Value to set for var + * @return void * @access public */ function write($config, $value = null) { @@ -341,6 +342,7 @@ class Configure extends Object { * Configure::delete('Name.key'); will delete only the Configure::Name[key] * * @param string $var the var to be deleted + * @return void * @access public */ function delete($var = null) { @@ -362,6 +364,7 @@ class Configure extends Object { * Usage Configure::load('configure_file'); * * @param string $fileName name of file to load, extension must be .php and only the name should be used, not the extenstion + * @return mixed false if file not found, void if load successful * @access public */ function load($fileName) { @@ -418,6 +421,7 @@ class Configure extends Object { * @param string $type Type of config file to write, ex: Models, Controllers, Helpers, Components * @param string $name file name. * @param array $data array of values to store. + * @return void * @access public */ function store($type, $name, $data = array()) { @@ -502,6 +506,7 @@ class Configure extends Object { * @param string $content Content to write on file * @param string $name Name to use for cache file * @param boolean $write true if content should be written, false otherwise + * @return void * @access private */ function __writeConfig($content, $name, $write = true) { @@ -550,6 +555,7 @@ class Configure extends Object { * Sets the paths for the given object type * * @param array $paths paths defines in config/bootstrap.php + * @return void * @access private */ function buildPaths($paths) { @@ -597,6 +603,7 @@ class Configure extends Object { * they will be added to the paths vars * * @param boolean $boot Load application bootstrap (if true) + * @return void * @access private */ function __loadBootstrap($boot) { @@ -914,6 +921,7 @@ class App extends Object { * * @param string $file full path to file including file name * @return boolean + * @access private */ function __load($file) { if (empty($file)) { @@ -1117,6 +1125,8 @@ class App extends Object { * @param string $name name of object * @param string $type type of object * @param string $plugin name of plugin + * @return void + * @access private */ function __remove($name, $type, $plugin) { $_this =& App::getInstance(); @@ -1132,6 +1142,7 @@ class App extends Object { * Object destructor * * Write cache file if changes have been made to the $__map or $__paths + * @return void * @access private */ function __destruct() { diff --git a/cake/libs/controller/component.php b/cake/libs/controller/component.php index 72ed52073..2b3caf404 100644 --- a/cake/libs/controller/component.php +++ b/cake/libs/controller/component.php @@ -55,6 +55,7 @@ class Component extends Object { * Used to initialize the components for current controller * * @param object $controller Controller with components to load + * @return void * @access public */ function init(&$controller) { @@ -73,6 +74,7 @@ class Component extends Object { * Called before the Controller::beforeFilter() * * @param object $controller Controller with components to initialize + * @return void * @access public */ function initialize(&$controller) { @@ -91,6 +93,7 @@ class Component extends Object { * Called after the Controller::beforeFilter() and before the controller action * * @param object $controller Controller with components to startup + * @return void * @access public */ function startup(&$controller) { @@ -105,6 +108,7 @@ class Component extends Object { * Called after the Controller::beforeRender(), after the view class is loaded, and before the Controller::render() * * @param object $controller Controller with components to beforeRender + * @return void * @access public */ function beforeRender(&$controller) { @@ -119,6 +123,7 @@ class Component extends Object { * Called before Controller::redirect(); * * @param object $controller Controller with components to beforeRedirect + * @return void * @access public */ function beforeRedirect(&$controller, $url, $status = null, $exit = true) { @@ -139,6 +144,7 @@ class Component extends Object { * Called after Controller::render() and before the output is printed to the browser * * @param object $controller Controller with components to shutdown + * @return void * @access public */ function shutdown(&$controller) { diff --git a/cake/libs/controller/components/acl.php b/cake/libs/controller/components/acl.php index b518b10f7..ddf0a9dc4 100644 --- a/cake/libs/controller/components/acl.php +++ b/cake/libs/controller/components/acl.php @@ -254,6 +254,7 @@ class DbAcl extends AclBase { * Enter description here... * * @param object $component + * @return void * @access public */ function initialize(&$component) { diff --git a/cake/libs/controller/components/auth.php b/cake/libs/controller/components/auth.php index 5a821f6f4..82fc252dd 100644 --- a/cake/libs/controller/components/auth.php +++ b/cake/libs/controller/components/auth.php @@ -220,6 +220,7 @@ class AuthComponent extends Object { * Initializes AuthComponent for use in the controller * * @param object $controller A reference to the instantiating controller object + * @return void * @access public */ function initialize(&$controller) { @@ -251,6 +252,7 @@ class AuthComponent extends Object { * of login form data. * * @param object $controller A reference to the instantiating controller object + * @return boolean * @access public */ function startup(&$controller) { @@ -380,6 +382,7 @@ class AuthComponent extends Object { * $userModel and $sessionKey. * * @param object $controller A reference to the instantiating controller object + * @return boolean * @access private */ function __setDefaults() { @@ -511,6 +514,7 @@ class AuthComponent extends Object { * @param string $action Controller action name * @param string $action Controller action name * @param string ... etc. + * @return void * @access public */ function allow() { @@ -530,6 +534,7 @@ class AuthComponent extends Object { * @param string $action Controller action name * @param string $action Controller action name * @param string ... etc. + * @return void * @see AuthComponent::allow() * @access public */ @@ -547,6 +552,7 @@ class AuthComponent extends Object { * Maps action names to CRUD operations. Used for controller-based authentication. * * @param array $map Actions to map + * @return void * @access public */ function mapActions($map = array()) { @@ -605,7 +611,8 @@ class AuthComponent extends Object { /** * Get the current user from the session. * - * @return array User record, or null if no user is logged in. + * @param string $key field to retrive. Leave null to get entire User record + * @return mixed User record. or null if no user is logged in. * @access public */ function user($key = null) { diff --git a/cake/libs/controller/components/cookie.php b/cake/libs/controller/components/cookie.php index f952388d6..d9e8c6437 100644 --- a/cake/libs/controller/components/cookie.php +++ b/cake/libs/controller/components/cookie.php @@ -270,6 +270,7 @@ class CookieComponent extends Object { * Failure to do so will result in header already sent errors. * * @param string $key Key of the value to be deleted + * @return void * @access public */ function del($key) { @@ -298,6 +299,7 @@ class CookieComponent extends Object { * You must use this method before any output is sent to the browser. * Failure to do so will result in header already sent errors. * + * @return void * @access public */ function destroy() { @@ -416,13 +418,13 @@ class CookieComponent extends Object { } } } else { - $pos = strpos($value, 'Q2FrZQ==.'); - $decrypted[$name] = $this->__explode($value); + $pos = strpos($value, 'Q2FrZQ==.'); + $decrypted[$name] = $this->__explode($value); - if ($pos !== false) { - $value = substr($value, 8); - $decrypted[$name] = $this->__explode(Security::$type(base64_decode($value), $this->key)); - } + if ($pos !== false) { + $value = substr($value, 8); + $decrypted[$name] = $this->__explode(Security::$type(base64_decode($value), $this->key)); + } } } diff --git a/cake/libs/controller/components/request_handler.php b/cake/libs/controller/components/request_handler.php index 2d7761b49..9693ceaa2 100644 --- a/cake/libs/controller/components/request_handler.php +++ b/cake/libs/controller/components/request_handler.php @@ -157,6 +157,7 @@ class RequestHandlerComponent extends Object { * as the first item. * * @param object $controller A reference to the controller + * @return void * @see Router::parseExtensions() * @access public */ @@ -180,6 +181,7 @@ class RequestHandlerComponent extends Object { * to the $data property of the controller, which can then be saved to a model object. * * @param object $controller A reference to the controller + * @return void * @access public */ function startup(&$controller) { @@ -359,6 +361,7 @@ class RequestHandlerComponent extends Object { * @param string $name The name of the Content-type, i.e. "html", "xml", "css" * @param mixed $type The Content-type or array of Content-types assigned to the name, * i.e. "text/html", or "application/xml" + * @return void * @access public */ function setContent($name, $type = null) { @@ -462,6 +465,7 @@ class RequestHandlerComponent extends Object { * Determines the content type of the data the client has sent (i.e. in a POST request) * * @param mixed $type Can be null (or no parameter), a string type name, or an array of types + * @return mixed * @access public */ function requestedWith($type = null) { @@ -546,6 +550,7 @@ class RequestHandlerComponent extends Object { * * @param object $controller A reference to a controller object * @param string $type Type of response to send (e.g: 'ajax') + * @return void * @access public * @see RequestHandlerComponent::setContent() * @see RequestHandlerComponent::respondAs() diff --git a/cake/libs/controller/components/security.php b/cake/libs/controller/components/security.php index d34a7a481..7b92ff2d6 100644 --- a/cake/libs/controller/components/security.php +++ b/cake/libs/controller/components/security.php @@ -192,6 +192,7 @@ class SecurityComponent extends Object { /** * Sets the actions that require a POST request, or empty for all actions * + * @return void * @access public */ function requirePost() { @@ -201,6 +202,7 @@ class SecurityComponent extends Object { /** * Sets the actions that require a GET request, or empty for all actions * + * @return void * @access public */ function requireGet() { @@ -210,6 +212,7 @@ class SecurityComponent extends Object { /** * Sets the actions that require a PUT request, or empty for all actions * + * @return void * @access public */ function requirePut() { @@ -219,6 +222,7 @@ class SecurityComponent extends Object { /** * Sets the actions that require a DELETE request, or empty for all actions * + * @return void * @access public */ function requireDelete() { @@ -228,6 +232,7 @@ class SecurityComponent extends Object { /** * Sets the actions that require a request that is SSL-secured, or empty for all actions * + * @return void * @access public */ function requireSecure() { @@ -237,6 +242,7 @@ class SecurityComponent extends Object { /** * Sets the actions that require an authenticated request, or empty for all actions * + * @return void * @access public */ function requireAuth() { @@ -246,6 +252,7 @@ class SecurityComponent extends Object { /** * Sets the actions that require an HTTP-authenticated request, or empty for all actions * + * @return void * @access public */ function requireLogin() { @@ -393,6 +400,7 @@ class SecurityComponent extends Object { * * @param string $method The HTTP method to assign controller actions to * @param array $actions Controller actions to set the required HTTP method to. + * @return void * @access protected */ function _requireMethod($method, $actions = array()) { @@ -642,6 +650,7 @@ class SecurityComponent extends Object { * Sets the default login options for an HTTP-authenticated request * * @param array $options Default login options + * @return void * @access protected */ function _setLoginDefaults(&$options) { diff --git a/cake/libs/controller/components/session.php b/cake/libs/controller/components/session.php index 6da83dfb3..d033364f5 100644 --- a/cake/libs/controller/components/session.php +++ b/cake/libs/controller/components/session.php @@ -76,6 +76,7 @@ class SessionComponent extends CakeSession { * Initializes the component, gets a reference to Controller::$param['bare']. * * @param object $controller A reference to the controller + * @return void * @access public */ function initialize(&$controller) { @@ -87,6 +88,7 @@ class SessionComponent extends CakeSession { * Startup method. * * @param object $controller Instantiating controller + * @return void * @access public */ function startup(&$controller) { @@ -98,6 +100,7 @@ class SessionComponent extends CakeSession { * Starts Session on if 'Session.start' is set to false in core.php * * @param string $base The base path for the Session + * @return void * @access public */ function activate($base = null) { @@ -115,6 +118,7 @@ class SessionComponent extends CakeSession { * @param string $name The name of the key your are setting in the session. * This should be in a Controller.key format for better organizing * @param string $value The value you want to store in a session. + * @return boolean Success * @access public */ function write($name, $value = null) { @@ -239,6 +243,7 @@ class SessionComponent extends CakeSession { * * In your controller: $this->Session->renew(); * + * @return void * @access public */ function renew() { @@ -267,6 +272,7 @@ class SessionComponent extends CakeSession { * * In your controller: $this->Session->destroy(); * + * @return void * @access public */ function destroy() { @@ -291,7 +297,8 @@ class SessionComponent extends CakeSession { /** * Starts Session if SessionComponent is used in Controller::beforeFilter(), * or is called from - * + * + * @return boolean * @access private */ function __start() { diff --git a/cake/libs/controller/controller.php b/cake/libs/controller/controller.php index 87a082d4b..297f708a3 100644 --- a/cake/libs/controller/controller.php +++ b/cake/libs/controller/controller.php @@ -301,6 +301,7 @@ class Controller extends Object { /** * Merge components, helpers, and uses vars from AppController and PluginAppController * + * @return void * @access protected */ function __mergeVars() { @@ -472,6 +473,7 @@ class Controller extends Object { * within the app, or an absolute URL * @param integer $status Optional HTTP status code (eg: 404) * @param boolean $exit If true, exit() will be called after the redirect + * @return mixed void if $exit = false. Terminates script if $exit = true * @access public */ function redirect($url, $status = null, $exit = true) { @@ -575,7 +577,7 @@ class Controller extends Object { } } /** - * undocumented function + * Conveinence method for header() * * @param string $status * @return void @@ -590,6 +592,7 @@ class Controller extends Object { * @param mixed $one A string or an array of data. * @param mixed $two Value in case $one is a string (which then works as the key). * Unused if $one is an associative array, otherwise serves as the values to $one's keys. + * @return void * @access public */ function set($one, $two = null) { @@ -773,6 +776,7 @@ class Controller extends Object { /** * Tells the browser not to cache the results of the current request by sending headers * + * @return void * @access public */ function disableCache() { @@ -789,6 +793,7 @@ class Controller extends Object { * @param string $message Message to display to the user * @param string $url Relative URL to redirect to after the time expires * @param integer $pause Time to show the message + * @return void Renders flash layout * @access public */ function flash($message, $url, $pause = 1) { diff --git a/cake/libs/controller/scaffold.php b/cake/libs/controller/scaffold.php index 290eca1b8..925b293fa 100644 --- a/cake/libs/controller/scaffold.php +++ b/cake/libs/controller/scaffold.php @@ -195,7 +195,8 @@ class Scaffold extends Object { /** * Outputs the content of a scaffold method passing it through the Controller::afterFilter() * - * @access private + * @return void + * @access protected */ function _output() { $this->controller->afterFilter(); diff --git a/cake/libs/debugger.php b/cake/libs/debugger.php index 670deff11..cb3ae4d7f 100644 --- a/cake/libs/debugger.php +++ b/cake/libs/debugger.php @@ -92,6 +92,7 @@ class Debugger extends Object { * * @return object * @access public + * @static */ function &getInstance() { static $instance = array(); @@ -106,15 +107,26 @@ class Debugger extends Object { return $instance[0]; } /** - * formats and outputs the passed var + * Formats and outputs the passed var + * + * @param $var mixed the variable to dump + * @return void + * @see exportVar + * @access public + * @static */ function dump($var) { $_this = Debugger::getInstance(); pr($_this->exportVar($var)); } /** - * neatly logs a given var -*/ + * Neatly logs a given var + * + * @param $var mixed Variable or content to log + * @param $level int type of log to use. Defaults to LOG_DEBUG + * @return void + * @static + */ function log($var, $level = LOG_DEBUG) { $_this = Debugger::getInstance(); $trace = $_this->trace(array('start' => 1, 'depth' => 2, 'format' => 'array')); @@ -213,6 +225,7 @@ class Debugger extends Object { * @param array $options Format for outputting stack trace * @return string Formatted stack trace * @access public + * @static */ function trace($options = array()) { $options = array_merge(array( @@ -289,6 +302,7 @@ class Debugger extends Object { * @param string $path Path to shorten * @return string Normalized path * @access public + * @static */ function trimPath($path) { if (!defined('CAKE_CORE_INCLUDE_PATH') || !defined('APP')) { @@ -318,6 +332,7 @@ class Debugger extends Object { * @param integer $context Number of lines of context to extract above and below $line * @return array Set of lines highlighted * @access public + * @static */ function excerpt($file, $line, $context = 2) { $data = $lines = array(); @@ -345,6 +360,7 @@ class Debugger extends Object { * @param string $var Variable to convert * @return string Variable as a formatted string * @access public + * @static */ function exportVar($var, $recursion = 0) { $_this = Debugger::getInstance(); @@ -395,6 +411,7 @@ class Debugger extends Object { * Handles object conversion to debug string * * @param string $var Object to convert + * @return string * @access private */ function __object($var) { @@ -463,30 +480,30 @@ class Debugger extends Object { $out = "{$error} ({$code}): {$description} [{$file}, line {$line}]"; if (Configure::read() > 0) { debug($out, false, false); - e('
'; } break; case 'html': @@ -517,6 +534,7 @@ class Debugger extends Object { * Verify that the application's salt has been changed from the default value * * @access public + * @static */ function checkSessionKey() { if (Configure::read('Security.salt') == 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi') { @@ -529,6 +547,7 @@ class Debugger extends Object { * * @param object $debugger A reference to the Debugger object * @access public + * @static */ function invoke(&$debugger) { set_error_handler(array(&$debugger, 'handleError')); diff --git a/cake/libs/file.php b/cake/libs/file.php index 0ed5555db..039135d9c 100644 --- a/cake/libs/file.php +++ b/cake/libs/file.php @@ -436,6 +436,7 @@ class File extends Object { * Returns the File's owner. * * @return integer the Fileowner + * @access public */ function owner() { if ($this->exists()) { diff --git a/cake/libs/folder.php b/cake/libs/folder.php index 66b5416db..fda62d9af 100644 --- a/cake/libs/folder.php +++ b/cake/libs/folder.php @@ -490,6 +490,7 @@ class Folder extends Object { * Returns the size in bytes of this Folder. * * @param string $directory Path to directory + * @return int size in bytes of current folder * @access public */ function dirsize() { diff --git a/cake/libs/inflector.php b/cake/libs/inflector.php index b8dcca2ce..ef0f11c60 100644 --- a/cake/libs/inflector.php +++ b/cake/libs/inflector.php @@ -144,6 +144,7 @@ class Inflector extends Object { /** * Initializes plural inflection rules * + * @return void * @access protected */ function __initPluralRules() { @@ -271,6 +272,7 @@ class Inflector extends Object { /** * Initializes singular inflection rules * + * @return void * @access protected */ function __initSingularRules() { @@ -458,7 +460,7 @@ class Inflector extends Object { * Returns Cake model class name ("Post" for the database table "posts".) for given database table. * * @param string $tableName Name of database table to get class name for - * @return string + * @return string Class name * @access public * @static */ @@ -470,7 +472,7 @@ class Inflector extends Object { * Returns camelBacked version of a string. * * @param string $string - * @return string + * @return string in variable form * @access public * @static */ diff --git a/cake/libs/model/behavior.php b/cake/libs/model/behavior.php index e621e7039..b479f10d8 100644 --- a/cake/libs/model/behavior.php +++ b/cake/libs/model/behavior.php @@ -150,6 +150,7 @@ class ModelBehavior extends Object { * * @see Object::dispatchMethod * @access public + * @return mixed */ function dispatchMethod(&$model, $method, $params = array()) { if (empty($params)) { @@ -244,6 +245,7 @@ class BehaviorCollection extends Object { * Attaches a model object and loads a list of behaviors * * @access public + * @return void */ function init($modelName, $behaviors = array()) { $this->modelName = $modelName; @@ -317,6 +319,7 @@ class BehaviorCollection extends Object { * Detaches a behavior from a model * * @param string $name CamelCased name of the behavior to unload + * @return void * @access public */ function detach($name) { diff --git a/cake/libs/model/behaviors/acl.php b/cake/libs/model/behaviors/acl.php index 4e966e968..d80b0927f 100644 --- a/cake/libs/model/behaviors/acl.php +++ b/cake/libs/model/behaviors/acl.php @@ -48,6 +48,7 @@ class AclBehavior extends ModelBehavior { * * @param mixed $config * @return void + * @access public */ function setup(&$model, $config = array()) { if (is_string($config)) { @@ -69,6 +70,7 @@ class AclBehavior extends ModelBehavior { * * @param mixed $ref * @return array + * @access public */ function node(&$model, $ref = null) { $type = $this->__typeMaps[strtolower($this->settings[$model->name]['type'])]; @@ -82,6 +84,7 @@ class AclBehavior extends ModelBehavior { * * @param boolean $created True if this is a new record * @return void + * @access public */ function afterSave(&$model, $created) { if ($created) { @@ -105,6 +108,7 @@ class AclBehavior extends ModelBehavior { * Destroys the ARO/ACO node bound to the deleted record * * @return void + * @access public */ function afterDelete(&$model) { $type = $this->__typeMaps[strtolower($this->settings[$model->name]['type'])]; diff --git a/cake/libs/model/behaviors/containable.php b/cake/libs/model/behaviors/containable.php index f75ffc5be..63f4039d3 100644 --- a/cake/libs/model/behaviors/containable.php +++ b/cake/libs/model/behaviors/containable.php @@ -92,6 +92,7 @@ class ContainableBehavior extends ModelBehavior { * * @param object $Model Model using the behavior * @param array $query Query parameters as set by cake + * @return array * @access public */ function beforeFind(&$Model, $query) { @@ -223,6 +224,7 @@ class ContainableBehavior extends ModelBehavior { * parameters unbinds all related models. * * @param object $Model Model on which binding restriction is being applied + * @return void * @access public */ function contain(&$Model) { @@ -236,6 +238,7 @@ class ContainableBehavior extends ModelBehavior { * contain call. * * @param object $Model Model on which to reset bindings + * @return void * @access public */ function resetBindings(&$Model) { diff --git a/cake/libs/model/behaviors/translate.php b/cake/libs/model/behaviors/translate.php index f7f0eb434..d5e71f352 100644 --- a/cake/libs/model/behaviors/translate.php +++ b/cake/libs/model/behaviors/translate.php @@ -51,6 +51,10 @@ class TranslateBehavior extends ModelBehavior { * * $config could be empty - and translations configured dynamically by * bindTranslation() method + * + * @param array $config + * @return mixed + * @access public */ function setup(&$model, $config = array()) { $db =& ConnectionManager::getDataSource($model->useDbConfig); @@ -66,6 +70,9 @@ class TranslateBehavior extends ModelBehavior { } /** * Callback + * + * @return void + * @access public */ function cleanup(&$model) { $this->unbindTranslation($model); @@ -73,7 +80,11 @@ class TranslateBehavior extends ModelBehavior { unset($this->runtime[$model->alias]); } /** - * Callback + * beforeFind Callback + * + * @param array $query + * @return array Modified query + * @access public */ function beforeFind(&$model, $query) { $locale = $this->_getLocale($model); @@ -182,7 +193,12 @@ class TranslateBehavior extends ModelBehavior { return $query; } /** - * Callback + * afterFind Callback + * + * @param array $results + * @param boolean $primary + * @return array Modified results + * @access public */ function afterFind(&$model, $results, $primary) { $this->runtime[$model->alias]['fields'] = array(); @@ -221,7 +237,10 @@ class TranslateBehavior extends ModelBehavior { return $results; } /** - * Callback + * beforeValidate Callback + * + * @return boolean + * @access public */ function beforeValidate(&$model) { $locale = $this->_getLocale($model); @@ -250,7 +269,11 @@ class TranslateBehavior extends ModelBehavior { return true; } /** - * Callback + * afterSave Callback + * + * @param boolean $created + * @return void + * @access public */ function afterSave(&$model, $created) { if (!isset($this->runtime[$model->alias]['beforeSave'])) { @@ -289,7 +312,10 @@ class TranslateBehavior extends ModelBehavior { } } /** - * Callback + * afterDelete Callback + * + * @return void + * @access public */ function afterDelete(&$model) { $RuntimeModel =& $this->translateModel($model); @@ -300,6 +326,7 @@ class TranslateBehavior extends ModelBehavior { * Get selected locale for model * * @return mixed string or false + * @access protected */ function _getLocale(&$model) { if (!isset($model->locale) || is_null($model->locale)) { @@ -317,6 +344,7 @@ class TranslateBehavior extends ModelBehavior { * Get instance of model for translations * * @return object + * @access public */ function &translateModel(&$model) { if (!isset($this->runtime[$model->alias]['model'])) { diff --git a/cake/libs/model/behaviors/tree.php b/cake/libs/model/behaviors/tree.php index 2254d86f0..9f82ac06d 100644 --- a/cake/libs/model/behaviors/tree.php +++ b/cake/libs/model/behaviors/tree.php @@ -35,14 +35,30 @@ * @subpackage cake.cake.libs.model.behaviors */ class TreeBehavior extends ModelBehavior { - +/** + * Errors + * + * @var array + */ var $errors = array(); - +/** + * Defaults + * + * @var array + * @access protected + */ var $_defaults = array( 'parent' => 'parent_id', 'left' => 'lft', 'right' => 'rght', 'scope' => '1 = 1', 'type' => 'nested', '__parentChange' => false, 'recursive' => -1 ); - +/** + * Initiate Tree behavior + * + * @param object $model + * @param array $config + * @return void + * @access public + */ function setup(&$model, $config = array()) { if (!is_array($config)) { $config = array('type' => $config); @@ -66,6 +82,7 @@ class TreeBehavior extends ModelBehavior { * @param AppModel $model * @param boolean $created indicates whether the node just saved was created or updated * @return boolean true on success, false on failure + * @access public */ function afterSave(&$model, $created) { extract($this->settings[$model->alias]); @@ -85,6 +102,7 @@ class TreeBehavior extends ModelBehavior { * * @param AppModel $model * @return boolean true to continue, false to abort the delete + * @access public */ function beforeDelete(&$model) { extract($this->settings[$model->alias]); @@ -116,6 +134,7 @@ class TreeBehavior extends ModelBehavior { * @since 1.2 * @param AppModel $model * @return boolean true to continue, false to abort the save + * @access public */ function beforeSave(&$model) { extract($this->settings[$model->alias]); diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index dab196d4c..50963123b 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -417,6 +417,7 @@ class Model extends Overloadable { * @param array $options If $model is a string, this is the list of association properties with which $model will * be bound * @param boolean $permanent Set to true to make the binding permanent + * @return void * @access public * @todo */ @@ -526,6 +527,7 @@ class Model extends Overloadable { /** * Create a set of associations * + * @return void * @access private */ function __createLinks() { @@ -585,6 +587,7 @@ class Model extends Overloadable { * * var $hasMany = array('ModelName'); * usage: $this->ModelName->modelMethods(); + * @return void * @access private */ function __constructLinkedModel($assoc, $className = null) { @@ -608,6 +611,7 @@ class Model extends Overloadable { * Build array-based association from string. * * @param string $type 'belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany' + * @return void * @access private */ function __generateAssociation($type) { @@ -687,6 +691,7 @@ class Model extends Overloadable { * Sets a custom table for your controller class. Used by your controller to select a database table. * * @param string $tableName Name of the custom table + * @return void * @access public */ function setSource($tableName) { @@ -1475,6 +1480,7 @@ class Model extends Overloadable { /** * Private helper method used by saveAll * + * @return boolean Success * @access private * @see Model::saveAll() */ @@ -1571,6 +1577,7 @@ class Model extends Overloadable { * * @param string $id ID of record that was deleted * @param boolean $cascade Set to true to delete records that depend on this record + * @return void * @access protected */ function _deleteDependent($id, $cascade) { @@ -1609,6 +1616,7 @@ class Model extends Overloadable { * Cascades model deletes to HABTM join keys. * * @param string $id ID of record that was deleted + * @return void * @access protected */ function _deleteLinks($id) { @@ -1675,6 +1683,7 @@ class Model extends Overloadable { /** * Collects foreign keys from associations * + * @return array * @access private */ function __collectForeignKeys($type = 'belongsTo') { @@ -1942,7 +1951,7 @@ class Model extends Overloadable { * @param string $state Either "before" or "after" * @param mixed $query * @param array $results - * @return void + * @return array * @access protected */ function _findNeighbors($state, $query, $results = array()) { @@ -2390,6 +2399,7 @@ class Model extends Overloadable { /** * Top secret * + * @return array * @access public */ function normalizeFindParams($type, $data, $altType = null, $r = array(), $_this = null) { @@ -2569,6 +2579,7 @@ class Model extends Overloadable { * @param mixed $with The 'with' key of the model association * @param array $keys Any join keys which must be merged with the keys queried * @return array + * @access public */ function joinModel($assoc, $keys = array()) { if (is_string($assoc)) { @@ -2693,6 +2704,7 @@ class Model extends Overloadable { * Called when unserializing a model * * @access private + * @todo */ function __wakeup() { } diff --git a/cake/libs/model/schema.php b/cake/libs/model/schema.php index 3e84d96b6..6cc4067f7 100644 --- a/cake/libs/model/schema.php +++ b/cake/libs/model/schema.php @@ -94,6 +94,7 @@ class CakeSchema extends Object { * Builds schema object properties * * @param array $data loaded object properties + * @return void * @access protected */ function _build($data) { diff --git a/cake/libs/object.php b/cake/libs/object.php index a947cb03a..ebf0faa6a 100644 --- a/cake/libs/object.php +++ b/cake/libs/object.php @@ -142,6 +142,7 @@ class Object { * * @param string $msg Log message * @param integer $type Error type constant. Defined in app/config/core.php. + * @return boolean Success of log write * @access public */ function log($msg, $type = LOG_ERROR) { @@ -160,6 +161,7 @@ class Object { * Allows setting of multiple properties of the object in a single line of code. * * @param array $properties An associative array containing properties and corresponding values. + * @return void * @access protected */ function _set($properties = array()) { @@ -237,7 +239,7 @@ class Object { * * @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 + * @return boolean true on save, throws error if file can not be created * @access protected */ function _savePersistent($name, &$object) { @@ -253,6 +255,7 @@ class Object { * * @param string $name Name of persisted class * @param string $type Type of persistance (e.g: registry) + * @return void * @access private */ function __openPersistent($name, $type = null) { diff --git a/cake/libs/router.php b/cake/libs/router.php index 29e66375a..e6171a2cb 100644 --- a/cake/libs/router.php +++ b/cake/libs/router.php @@ -240,6 +240,7 @@ class Router extends Object { * * @param array $named A list of named parameters. Key value pairs are accepted where values are either regex strings to match, or arrays as seen above. * @param array $options Allows to control all settings: separator, greedy, reset, default + * @return array * @access public * @static */ @@ -283,6 +284,7 @@ class Router extends Object { * 'id' - The regular expression fragment to use when matching IDs. By default, matches * integer values and UUIDs. * 'prefix' - URL prefix to use for the generated routes. Defaults to '/'. + * @return void * @access public * @static */ @@ -312,7 +314,7 @@ class Router extends Object { * @param string $route An empty string, or a route string "/" * @param array $default NULL or an array describing the default route * @param array $params An array matching the named elements in the route to regular expressions which that element should match. - * @return string + * @return array * @see routes * @access public * @static @@ -580,7 +582,8 @@ class Router extends Object { /** * Connects the default, built-in routes, including admin routes, and (deprecated) web services * routes. - * + * + * @return void * @access private */ function __connectDefaultRoutes() { @@ -623,6 +626,7 @@ class Router extends Object { * Takes parameter and path information back from the Dispatcher * * @param array $params Parameters and path information + * @return void * @access public * @static */ @@ -697,6 +701,7 @@ class Router extends Object { * Reloads default Router settings * * @access public + * @return void * @static */ function reload() { @@ -1282,6 +1287,7 @@ class Router extends Object { * parsed, excluding querystring parameters (i.e. ?q=...). * * @access public + * @return void * @static */ function parseExtensions() { @@ -1294,8 +1300,9 @@ class Router extends Object { /** * Takes an passed params and converts it to args * - * @access public * @param array $params + * @return array Array containing passed and named parameters + * @access public * @static */ function getArgs($args, $options = array()) { diff --git a/cake/libs/sanitize.php b/cake/libs/sanitize.php index 50d1c2684..6586dea75 100644 --- a/cake/libs/sanitize.php +++ b/cake/libs/sanitize.php @@ -103,6 +103,7 @@ class Sanitize { * Strips extra whitespace from output * * @param string $str String to sanitize + * @return string whitespace sanitized string * @access public * @static */ @@ -114,6 +115,7 @@ class Sanitize { * Strips image tags from output * * @param string $str String to sanitize + * @return string Sting with images stripped. * @access public * @static */ @@ -127,6 +129,7 @@ class Sanitize { * Strips scripts and stylesheets from output * * @param string $str String to sanitize + * @return string String with