From e74d835a622b0aaaa6a3cdb3bb80cc478c0317f1 Mon Sep 17 00:00:00 2001 From: Juan Basso Date: Sat, 30 Jul 2011 17:02:25 -0400 Subject: [PATCH] Fixed some API doc in routing and cache. --- lib/Cake/Cache/Engine/ApcEngine.php | 1 + lib/Cake/Cache/Engine/FileEngine.php | 4 ++++ lib/Cake/Cache/Engine/MemcacheEngine.php | 1 + lib/Cake/Cache/Engine/WincacheEngine.php | 1 + lib/Cake/Cache/Engine/XcacheEngine.php | 3 ++- lib/Cake/Routing/Dispatcher.php | 7 ++++--- lib/Cake/Routing/Route/CakeRoute.php | 9 +-------- lib/Cake/Routing/Route/RedirectRoute.php | 2 +- lib/Cake/Routing/Router.php | 6 +++--- 9 files changed, 18 insertions(+), 16 deletions(-) diff --git a/lib/Cake/Cache/Engine/ApcEngine.php b/lib/Cake/Cache/Engine/ApcEngine.php index 43fbb72829e..da9f27911b8 100644 --- a/lib/Cake/Cache/Engine/ApcEngine.php +++ b/lib/Cake/Cache/Engine/ApcEngine.php @@ -108,6 +108,7 @@ public function delete($key) { /** * Delete all keys from the cache. This will clear every cache config using APC. * + * @param boolean $check * @return boolean True if the cache was successfully cleared, false otherwise */ public function clear($check) { diff --git a/lib/Cake/Cache/Engine/FileEngine.php b/lib/Cake/Cache/Engine/FileEngine.php index ecf48c89ddf..9e40198c0bc 100644 --- a/lib/Cake/Cache/Engine/FileEngine.php +++ b/lib/Cake/Cache/Engine/FileEngine.php @@ -247,6 +247,8 @@ public function clear($check) { /** * Not implemented * + * @param string $key + * @param integer $offset * @return void * @throws CacheException */ @@ -257,6 +259,8 @@ public function decrement($key, $offset = 1) { /** * Not implemented * + * @param string $key + * @param integer $offset * @return void * @throws CacheException */ diff --git a/lib/Cake/Cache/Engine/MemcacheEngine.php b/lib/Cake/Cache/Engine/MemcacheEngine.php index 835496b32e8..e9317490777 100644 --- a/lib/Cake/Cache/Engine/MemcacheEngine.php +++ b/lib/Cake/Cache/Engine/MemcacheEngine.php @@ -189,6 +189,7 @@ public function delete($key) { /** * Delete all keys from the cache * + * @param boolean $check * @return boolean True if the cache was successfully cleared, false otherwise */ public function clear($check) { diff --git a/lib/Cake/Cache/Engine/WincacheEngine.php b/lib/Cake/Cache/Engine/WincacheEngine.php index 702aa21a779..407ce9f2c08 100644 --- a/lib/Cake/Cache/Engine/WincacheEngine.php +++ b/lib/Cake/Cache/Engine/WincacheEngine.php @@ -115,6 +115,7 @@ public function delete($key) { * Delete all keys from the cache. This will clear every cache value stored * in wincache. * + * @param boolean $check * @return boolean True if the cache was successfully cleared, false otherwise */ public function clear($check) { diff --git a/lib/Cake/Cache/Engine/XcacheEngine.php b/lib/Cake/Cache/Engine/XcacheEngine.php index 50bc16f469a..21d0f308c7b 100644 --- a/lib/Cake/Cache/Engine/XcacheEngine.php +++ b/lib/Cake/Cache/Engine/XcacheEngine.php @@ -124,6 +124,7 @@ public function delete($key) { /** * Delete all keys from the cache * + * @param boolean $check * @return boolean True if the cache was successfully cleared, false otherwise */ public function clear($check) { @@ -144,7 +145,7 @@ public function clear($check) { * (see xcache.admin configuration settings) * * @param boolean $reverse Revert changes - * @access private + * @return void */ function __auth($reverse = false) { static $backup = array(); diff --git a/lib/Cake/Routing/Dispatcher.php b/lib/Cake/Routing/Dispatcher.php index f16690274f3..474ebd640ed 100644 --- a/lib/Cake/Routing/Dispatcher.php +++ b/lib/Cake/Routing/Dispatcher.php @@ -95,8 +95,8 @@ public function dispatch(CakeRequest $request, CakeResponse $response, $addition * * @param Controller $controller Controller to invoke * @param CakeRequest $request The request object to invoke the controller for. - * @return string Output as sent by controller - * @throws MissingActionException when the action being called is missing. + * @param CakeResponse $response The response object to receive the output + * @return void */ protected function _invoke(Controller $controller, CakeRequest $request, CakeResponse $response) { $controller->constructClasses(); @@ -165,7 +165,7 @@ protected function _getController($request, $response) { /** * Load controller and return controller classname * - * @param array $params Array of parameters + * @param CakeRequest $request * @return string|bool Name of controller class name */ protected function _loadController($request) { @@ -202,6 +202,7 @@ protected function _loadRoutes() { * Outputs cached dispatch view cache * * @param string $path Requested URL path + * @return string|boolean False if is not cached or output */ public function cached($path) { if (Configure::read('Cache.check') === true) { diff --git a/lib/Cake/Routing/Route/CakeRoute.php b/lib/Cake/Routing/Route/CakeRoute.php index 79ae86bd0fe..eaaea28e36e 100644 --- a/lib/Cake/Routing/Route/CakeRoute.php +++ b/lib/Cake/Routing/Route/CakeRoute.php @@ -27,7 +27,6 @@ class CakeRoute { * `/:controller/:action/:id` has 3 key elements * * @var array - * @access public */ public $keys = array(); @@ -35,7 +34,6 @@ class CakeRoute { * An array of additional parameters for the Route. * * @var array - * @access public */ public $options = array(); @@ -43,7 +41,6 @@ class CakeRoute { * Default parameters for a Route * * @var array - * @access public */ public $defaults = array(); @@ -51,7 +48,6 @@ class CakeRoute { * The routes template string. * * @var string - * @access public */ public $template = null; @@ -60,7 +56,6 @@ class CakeRoute { * template * * @var string - * @access protected */ protected $_greedy = false; @@ -68,7 +63,6 @@ class CakeRoute { * The compiled route regular expresssion * * @var string - * @access protected */ protected $_compiledRoute = null; @@ -76,7 +70,6 @@ class CakeRoute { * HTTP header shortcut map. Used for evaluating header-based route expressions. * * @var array - * @access private */ private $__headerMap = array( 'type' => 'content_type', @@ -89,7 +82,7 @@ class CakeRoute { * * @param string $template Template string with parameter placeholders * @param array $defaults Array of defaults for the route. - * @param string $params Array of parameters and additional options for the Route + * @param array $options Array of additional options for the Route * @return void */ public function __construct($template, $defaults = array(), $options = array()) { diff --git a/lib/Cake/Routing/Route/RedirectRoute.php b/lib/Cake/Routing/Route/RedirectRoute.php index a83f00f1ca9..ece73907664 100644 --- a/lib/Cake/Routing/Route/RedirectRoute.php +++ b/lib/Cake/Routing/Route/RedirectRoute.php @@ -42,7 +42,7 @@ class RedirectRoute extends CakeRoute { * * @param string $template Template string with parameter placeholders * @param array $defaults Array of defaults for the route. - * @param string $params Array of parameters and additional options for the Route + * @param array $options Array of additional options for the Route */ public function __construct($template, $defaults = array(), $options = array()) { parent::__construct($template, $defaults, $options); diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index 11cf19537cc..83895e7c948 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -520,7 +520,7 @@ private static function __parseExtension($url) { * Will accept either a CakeRequest object or an array of arrays. Support for * accepting arrays may be removed in the future. * - * @param mixed $params Parameters and path information or a CakeRequest object. + * @param CakeRequest|array $request Parameters and path information or a CakeRequest object. * @return void */ public static function setRequestInfo($request) { @@ -618,7 +618,7 @@ public static function reload() { /** * Promote a route (by default, the last one added) to the beginning of the list * - * @param $which A zero-based array index representing the route to move. For example, + * @param integer $which A zero-based array index representing the route to move. For example, * if 3 routes have been added, the last route would be 2. * @return boolean Returns false if no route exists at the position specified by $which. */ @@ -909,7 +909,7 @@ public static function queryString($q, $extra = array(), $escape = false) { * This will strip out 'autoRender', 'bare', 'requested', and 'return' param names as those * are used for CakePHP internals and should not normally be part of an output url. * - * @param mixed $param The params array or CakeRequest object that needs to be reversed. + * @param CakeRequest|array $params The params array or CakeRequest object that needs to be reversed. * @param boolean $full Set to true to include the full url including the protocol when reversing * the url. * @return string The string that is the reversed result of the array