Permalink
Browse files

Fixing @link tags and updating documentation for basics.php, Controll…

…er, and Dispatcher.
  • Loading branch information...
1 parent d365faf commit 8ff0b536d881711d3260162685e42077ca8ef70f @markstory markstory committed Mar 28, 2010
Showing with 83 additions and 77 deletions.
  1. +16 −16 cake/basics.php
  2. +14 −9 cake/dispatcher.php
  3. +53 −52 cake/libs/controller/controller.php
View
@@ -98,7 +98,7 @@ function uses() {
* @param boolean $var Variable to show debug information for.
* @param boolean $showHtml If set to true, the method prints the debug data in a screen-friendly way.
* @param boolean $showFrom If set to true, the method prints from where the function was called.
- * @link http://book.cakephp.org/view/458/Basic-Debugging
+ * @link http://book.cakephp.org/view/1190/Basic-Debugging
*/
function debug($var = false, $showHtml = false, $showFrom = true) {
if (Configure::read() > 0) {
@@ -198,7 +198,7 @@ function array_combine($a1, $a2) {
* @param string $text Text to wrap through htmlspecialchars
* @param string $charset Character set to use when escaping. Defaults to config value in 'App.encoding' or 'UTF-8'
* @return string Wrapped text
- * @link http://book.cakephp.org/view/703/h
+ * @link http://book.cakephp.org/view/1132/h
*/
function h($text, $charset = null) {
if (is_array($text)) {
@@ -253,7 +253,7 @@ function pluginSplit($name, $dotAppend = false, $plugin = null) {
* `array('a', 'b')`
*
* @return array Array of given parameters
- * @link http://book.cakephp.org/view/694/a
+ * @link http://book.cakephp.org/view/1122/a
* @deprecated Will be removed in 2.0
*/
function a() {
@@ -273,7 +273,7 @@ function a() {
* `array('a'=>'b')`
*
* @return array Associative array
- * @link http://book.cakephp.org/view/695/aa
+ * @link http://book.cakephp.org/view/1123/aa
* @deprecated Will be removed in 2.0
*/
function aa() {
@@ -294,7 +294,7 @@ function aa() {
* Convenience method for echo().
*
* @param string $text String to echo
- * @link http://book.cakephp.org/view/700/e
+ * @link http://book.cakephp.org/view/1129/e
* @deprecated Will be removed in 2.0
*/
function e($text) {
@@ -306,7 +306,7 @@ function e($text) {
*
* @param string $str String to lowercase
* @return string Lowercased string
- * @link http://book.cakephp.org/view/705/low
+ * @link http://book.cakephp.org/view/1134/low
* @deprecated Will be removed in 2.0
*/
function low($str) {
@@ -318,7 +318,7 @@ function low($str) {
*
* @param string $str String to uppercase
* @return string Uppercased string
- * @link http://book.cakephp.org/view/710/up
+ * @link http://book.cakephp.org/view/1139/up
* @deprecated Will be removed in 2.0
*/
function up($str) {
@@ -332,7 +332,7 @@ function up($str) {
* @param string $replace String to insert
* @param string $subject String to search
* @return string Replaced string
- * @link http://book.cakephp.org/view/708/r
+ * @link http://book.cakephp.org/view/1137/r
* @deprecated Will be removed in 2.0
*/
function r($search, $replace, $subject) {
@@ -345,7 +345,7 @@ function r($search, $replace, $subject) {
*
* @see debug()
* @param array $var Variable to print out
- * @link http://book.cakephp.org/view/707/pr
+ * @link http://book.cakephp.org/view/1136/pr
*/
function pr($var) {
if (Configure::read() > 0) {
@@ -380,7 +380,7 @@ function params($p) {
* @param array Third array
* @param array Etc...
* @return array All array parameters merged into one
- * @link http://book.cakephp.org/view/696/am
+ * @link http://book.cakephp.org/view/1124/am
*/
function am() {
$r = array();
@@ -402,7 +402,7 @@ function am() {
*
* @param string $key Environment variable name.
* @return string Environment variable setting.
- * @link http://book.cakephp.org/view/701/env
+ * @link http://book.cakephp.org/view/1130/env
*/
function env($key) {
if ($key == 'HTTPS') {
@@ -619,7 +619,7 @@ function clearCache($params = null, $type = 'views', $ext = '.php') {
*
* @param array $values Array of values to strip slashes
* @return mixed What is returned from calling stripslashes
- * @link http://book.cakephp.org/view/709/stripslashes_deep
+ * @link http://book.cakephp.org/view/1138/stripslashes_deep
*/
function stripslashes_deep($values) {
if (is_array($values)) {
@@ -638,7 +638,7 @@ function stripslashes_deep($values) {
* @param string $singular Text to translate
* @param boolean $return Set to true to return translated string, or false to echo
* @return mixed translated string if $return is false string will be echoed
- * @link http://book.cakephp.org/view/693/__
+ * @link http://book.cakephp.org/view/1121/__
*/
function __($singular, $return = false) {
if (!$singular) {
@@ -919,7 +919,7 @@ function LogError($message) {
*
* @param string $file File to look for
* @return Full path to file if exists, otherwise false
- * @link http://book.cakephp.org/view/702/fileExistsInPath
+ * @link http://book.cakephp.org/view/1131/fileExistsInPath
*/
function fileExistsInPath($file) {
$paths = explode(PATH_SEPARATOR, ini_get('include_path'));
@@ -940,7 +940,7 @@ function fileExistsInPath($file) {
*
* @param string String to convert
* @return string with underscore remove from start and end of string
- * @link http://book.cakephp.org/view/697/convertSlash
+ * @link http://book.cakephp.org/view/1126/convertSlash
*/
function convertSlash($string) {
$string = trim($string, '/');
@@ -1001,7 +1001,7 @@ function http_build_query($data, $prefix = null, $argSep = null, $baseKey = null
* @param mixed $val1 Value to return in case condition matches
* @param mixed $val2 Value to return if condition doesn't match
* @return mixed $val1 or $val2, depending on whether $condition evaluates to a non-empty expression.
- * @link http://book.cakephp.org/view/704/ife
+ * @link http://book.cakephp.org/view/1133/ife
* @deprecated Will be removed in 2.0
*/
function ife($condition, $val1 = null, $val2 = null) {
View
@@ -82,7 +82,8 @@ function __construct($url = null, $base = false) {
}
/**
- * Dispatches and invokes given URL, handing over control to the involved controllers, and then renders the results (if autoRender is set).
+ * Dispatches and invokes given URL, handing over control to the involved controllers, and then renders the
+ * results (if autoRender is set).
*
* If no controller of given name can be found, invoke() shows error messages in
* the form of Missing Controllers information. It does the same with Actions (methods of Controllers are called
@@ -171,8 +172,9 @@ function dispatch($url = null, $additionalParams = array()) {
}
/**
- * Invokes given controller's render action if autoRender option is set. Otherwise the
- * contents of the operation are returned as a string.
+ * Initializes the components and models a controller will be using.
+ * Triggers the controller action, and invokes the rendering if Controller::$autoRender is true and echo's the output.
+ * Otherwise the return value of the controller action are returned.
*
* @param object $controller Controller to invoke
* @param array $params Parameters with at least the 'action' to invoke
@@ -216,10 +218,11 @@ function _invoke(&$controller, $params) {
/**
* Sets the params when $url is passed as an array to Object::requestAction();
+ * Merges the $url and $additionalParams and creates a string url.
*
- * @param array $url
- * @param array $additionalParams
- * @return string $url
+ * @param array $url Array or request parameters
+ * @param array $additionalParams Array of additional parameters.
+ * @return string $url The generated url string.
* @access private
*/
function __extractParams($url, $additionalParams = array()) {
@@ -414,7 +417,10 @@ function &__getController() {
$name = $ctrlClass;
$ctrlClass .= 'Controller';
if (class_exists($ctrlClass)) {
- if (empty($params['plugin']) && strtolower(get_parent_class($ctrlClass)) === strtolower($name . 'AppController')) {
+ if (
+ empty($params['plugin']) &&
+ strtolower(get_parent_class($ctrlClass)) === strtolower($name . 'AppController')
+ ) {
$params = $this->_restructureParams($params);
}
$this->params = $params;
@@ -424,7 +430,7 @@ function &__getController() {
}
/**
- * Load controller and return controller class
+ * Load controller and return controller classname
*
* @param array $params Array of parameters
* @return string|bool Name of controller class name
@@ -580,7 +586,6 @@ function cached($url) {
return $return;
}
}
-
return false;
}
Oops, something went wrong.

0 comments on commit 8ff0b53

Please sign in to comment.