Fixed some API doc in core and utility folders.

This commit is contained in:
Juan Basso 2011-07-28 23:24:31 -04:00
parent 02f290ac52
commit 9e75de2f28
10 changed files with 46 additions and 29 deletions

View file

@ -430,7 +430,7 @@ class Shell extends Object {
* @param string $prompt Prompt text.
* @param mixed $options Array or string of options.
* @param string $default Default input value.
* @return Either the default value, or the user-provided input.
* @return mixed Either the default value, or the user-provided input.
*/
public function in($prompt, $options = null, $default = null) {
if (!$this->interactive) {

View file

@ -1,5 +1,27 @@
<?php
/**
* CakePlugin class
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Core
* @since CakePHP(tm) v 2.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/**
* CakePlugin class
*
* @package Cake.Core
*/
class CakePlugin {
/**
@ -173,6 +195,7 @@ class CakePlugin {
* Retruns true if the plugin $plugin is already loaded
* If plugin is null, it will return a list of all loaded plugins
*
* @param string $plugin
* @return mixed boolean true if $plugin is already loaded.
* If $plugin is null, returns a list of plugins that have been loaded
*/

View file

@ -59,6 +59,7 @@ class Configure {
* - Include app/Config/bootstrap.php.
* - Setup error/exception handlers.
*
* @param boolean $boot
* @return void
*/
public static function bootstrap($boot = true) {
@ -246,6 +247,7 @@ class Configure {
/**
* Gets the names of the configured reader objects.
*
* @param string $name
* @return array Array of the configured reader objects.
*/
public static function configured($name = null) {

View file

@ -298,6 +298,7 @@ class ClassRegistry {
*
* @param string $key Key to include in map
* @param string $name Key that is being mapped
* @return void
*/
public static function map($key, $name) {
$_this = ClassRegistry::getInstance();

View file

@ -166,9 +166,8 @@ class Debugger {
/**
* Returns a reference to the Debugger singleton object instance.
*
* @param string $class
* @return object
* @access public
* @static
*/
public static function &getInstance($class = null) {
static $instance = array();
@ -193,10 +192,9 @@ class Debugger {
/**
* Formats and outputs the contents of the supplied variable.
*
* @param $var mixed the variable to dump
* @param mixed $var the variable to dump
* @return void
* @see Debugger::exportVar()
* @static
* @link http://book.cakephp.org/view/1191/Using-the-Debugger-Class
*/
public static function dump($var) {
@ -207,10 +205,9 @@ class Debugger {
* Creates an entry in the log file. The log entry will contain a stack trace from where it was called.
* as well as export the variable using exportVar. By default the log is written to the debug log.
*
* @param $var mixed Variable or content to log
* @param $level int type of log to use. Defaults to LOG_DEBUG
* @param mixed $var Variable or content to log
* @param integer $level type of log to use. Defaults to LOG_DEBUG
* @return void
* @static
* @link http://book.cakephp.org/view/1191/Using-the-Debugger-Class
*/
public static function log($var, $level = LOG_DEBUG) {
@ -442,8 +439,8 @@ class Debugger {
* Converts a variable to a string for debug output.
*
* @param string $var Variable to convert
* @param integer $recursion
* @return string Variable as a formatted string
* @static
* @link http://book.cakephp.org/view/1191/Using-the-Debugger-Class
*/
public static function exportVar($var, $recursion = 0) {
@ -537,6 +534,7 @@ class Debugger {
* @param string $format Format to use, including 'js' for JavaScript-enhanced HTML, 'html' for
* straight HTML output, or 'txt' for unformatted text.
* @param array $strings Template strings to be used for the output format.
* @return string
*/
public function output($format = null, $strings = array()) {
$_this = Debugger::getInstance();
@ -650,7 +648,7 @@ class Debugger {
/**
* Verifies that the application's salt and cipher seed value has been changed from the default value.
*
* @static
* @return void
*/
public static function checkSecurityKeys() {
if (Configure::read('Security.salt') == 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi') {

View file

@ -206,6 +206,7 @@ class File {
* all other platforms will use "\n"
*
* @param string $data Data to prepare for writing.
* @param boolean $forceWindows
* @return string The with converted line endings.
*/
public static function prepare($data, $forceWindows = false) {

View file

@ -181,7 +181,7 @@ class Folder {
/**
* Returns an array of all matching files in current directory.
*
* @param string $pattern Preg_match pattern (Defaults to: .*)
* @param string $regexpPattern Preg_match pattern (Defaults to: .*)
* @param boolean $sort Whether results should be sorted.
* @return array Files that match given pattern
*/
@ -426,7 +426,7 @@ class Folder {
*
* @param string $path The Path to read.
* @param mixed $exceptions Array of files to exclude from the read that will be performed.
* @access private
* @return void
*/
public function __tree($path, $exceptions) {
$this->path = $path;
@ -479,7 +479,6 @@ class Folder {
/**
* Returns the size in bytes of this Folder and its contents.
*
* @param string $directory Path to directory
* @return int size in bytes of current folder
*/
public function dirsize() {

View file

@ -438,9 +438,8 @@ class Inflector {
/**
* Returns the given lower_case_and_underscored_word as a CamelCased word.
*
* @param string $lower_case_and_underscored_word Word to camelize
* @param string $lowerCaseAndUnderscoredWord Word to camelize
* @return string Camelized word. LikeThis.
* @access public
* @link http://book.cakephp.org/view/1479/Class-methods
*/
public static function camelize($lowerCaseAndUnderscoredWord) {
@ -456,7 +455,6 @@ class Inflector {
*
* @param string $camelCasedWord Camel-cased word to be "underscorized"
* @return string Underscore-syntaxed version of the $camelCasedWord
* @access public
* @link http://book.cakephp.org/view/1479/Class-methods
*/
public static function underscore($camelCasedWord) {
@ -471,9 +469,8 @@ class Inflector {
* Returns the given underscored_word_group as a Human Readable Word Group.
* (Underscores are replaced by spaces and capitalized following words.)
*
* @param string $lower_case_and_underscored_word String to be made more readable
* @param string $lowerCaseAndUnderscoredWord String to be made more readable
* @return string Human-readable string
* @access public
* @link http://book.cakephp.org/view/1479/Class-methods
*/
public static function humanize($lowerCaseAndUnderscoredWord) {
@ -489,7 +486,6 @@ class Inflector {
*
* @param string $className Name of class to get database table name for
* @return string Name of the database table for given class
* @access public
* @link http://book.cakephp.org/view/1479/Class-methods
*/
public static function tableize($className) {
@ -505,7 +501,6 @@ class Inflector {
*
* @param string $tableName Name of database table to get class name for
* @return string Class name
* @access public
* @link http://book.cakephp.org/view/1479/Class-methods
*/
public static function classify($tableName) {
@ -521,7 +516,6 @@ class Inflector {
*
* @param string $string
* @return string in variable form
* @access public
* @link http://book.cakephp.org/view/1479/Class-methods
*/
public static function variable($string) {
@ -540,9 +534,7 @@ class Inflector {
*
* @param string $string the string you want to slug
* @param string $replacement will replace keys in map
* @param array $map extra elements to map to the replacement
* @return string
* @access public
* @link http://book.cakephp.org/view/1479/Class-methods
*/
public static function slug($string, $replacement = '_') {

View file

@ -59,8 +59,7 @@ class Set {
/**
* Filters empty elements out of a route array, excluding '0'.
*
* @param mixed $var Either an array to filter, or value when in callback
* @param boolean $isArray Force to tell $var is an array when $var is empty
* @param array $var Either an array to filter, or value when in callback
* @return mixed Either filtered array, or true/false when in callback
*/
public static function filter(array $var) {
@ -159,7 +158,7 @@ class Set {
* returned object (recursively). If $key is numeric will maintain array
* structure
*
* @param mixed $value Value to map
* @param array $array Array to map
* @param string $class Class name
* @param boolean $primary whether to assign first array key as the _name_
* @return mixed Mapped object
@ -506,6 +505,7 @@ class Set {
* @param mixed $conditions An array of condition strings or an XPath expression
* @param array $data An array of data to execute the match on
* @param integer $i Optional: The 'nth'-number of the item being matched.
* @param integer $length
* @return boolean
*/
public static function matches($conditions, $data = array(), $i = null, $length = null) {

View file

@ -462,7 +462,7 @@ class Validation {
* Validation of an IP address.
*
* @param string $check The string to test.
* @param string $ipVersion The IP Protocol version to validate against
* @param string $type The IP Protocol version to validate against
* @return boolean Success
*/
public static function ip($check, $type = 'both') {
@ -697,7 +697,6 @@ class Validation {
*
* @param string $check Value to check
* @param boolean $strict Require URL to be prefixed by a valid scheme (one of http(s)/ftp(s)/file/news/gopher)
* @param string $ipVersion The IP Protocol version to validate against
* @return boolean Success
*/
public static function url($check, $strict = false) {
@ -814,8 +813,10 @@ class Validation {
/**
* Luhn algorithm
*
* @see http://en.wikipedia.org/wiki/Luhn_algorithm
* @param string|array $check
* @param boolean $deep
* @return boolean Success
* @see http://en.wikipedia.org/wiki/Luhn_algorithm
*/
public static function luhn($check, $deep = false) {
if (is_array($check)) {