From b8c283a695c8074a57d8c3dfa00934312638931d Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 19 Jul 2013 16:02:53 -0700 Subject: Dropping unecessary php: directive to function definitions in user guide --- .../source/general/ancillary_classes.rst | 4 +- user_guide_src/source/general/common_functions.rst | 24 +++++------ user_guide_src/source/general/errors.rst | 12 +++--- user_guide_src/source/helpers/array_helper.rst | 12 +++--- user_guide_src/source/helpers/captcha_helper.rst | 4 +- user_guide_src/source/helpers/cookie_helper.rst | 6 +-- user_guide_src/source/helpers/date_helper.rst | 28 ++++++------ user_guide_src/source/helpers/download_helper.rst | 2 +- user_guide_src/source/helpers/email_helper.rst | 4 +- user_guide_src/source/helpers/file_helper.rst | 18 ++++---- user_guide_src/source/helpers/form_helper.rst | 50 +++++++++++----------- user_guide_src/source/helpers/html_helper.rst | 18 ++++---- user_guide_src/source/helpers/inflector_helper.rst | 12 +++--- user_guide_src/source/helpers/language_helper.rst | 4 +- user_guide_src/source/helpers/number_helper.rst | 4 +- user_guide_src/source/helpers/path_helper.rst | 4 +- user_guide_src/source/helpers/security_helper.rst | 10 ++--- user_guide_src/source/helpers/smiley_helper.rst | 6 +-- user_guide_src/source/helpers/string_helper.rst | 26 +++++------ user_guide_src/source/helpers/text_helper.rst | 20 ++++----- .../source/helpers/typography_helper.rst | 6 +-- 21 files changed, 137 insertions(+), 137 deletions(-) (limited to 'user_guide_src/source') diff --git a/user_guide_src/source/general/ancillary_classes.rst b/user_guide_src/source/general/ancillary_classes.rst index 5dc058ad4..edb3a14fb 100644 --- a/user_guide_src/source/general/ancillary_classes.rst +++ b/user_guide_src/source/general/ancillary_classes.rst @@ -9,7 +9,7 @@ resources. This is easily possible as you'll see. get_instance() ============== -.. php:function:: get_instance() +.. function:: get_instance() :returns: object of class CI_Controller @@ -48,7 +48,7 @@ Once you've assigned the object to a variable, you'll use that variable passed by reference:: $CI =& get_instance(); - + This is very important. Assigning by reference allows you to use the original CodeIgniter object rather than creating a copy of it. diff --git a/user_guide_src/source/general/common_functions.rst b/user_guide_src/source/general/common_functions.rst index 32e8a8be0..8a57c183e 100644 --- a/user_guide_src/source/general/common_functions.rst +++ b/user_guide_src/source/general/common_functions.rst @@ -9,7 +9,7 @@ loading any libraries or helpers. is_php() ======== -.. php:function:: is_php($version = '5.3.0') +.. function:: is_php($version = '5.3.0') :param string $version: Version number :returns: bool @@ -31,7 +31,7 @@ version of PHP is lower than the supplied version number. is_really_writable() ==================== -.. php:function:: is_really_writable($file) +.. function:: is_really_writable($file) :param string $file: File path :returns: bool @@ -58,7 +58,7 @@ Example:: config_item() ============= -.. php:function:: config_item($key) +.. function:: config_item($key) :param string $key: Config item key :returns: mixed @@ -71,7 +71,7 @@ documentation for more information. show_error() ============ -.. php:function:: show_error($message, $status_code, $heading = 'An Error Was Encountered') +.. function:: show_error($message, $status_code, $heading = 'An Error Was Encountered') :param mixed $message: Error message :param int $status_code: HTTP Response status code @@ -84,7 +84,7 @@ please see the :doc:`Error Handling ` documentation. show_404() ========== -.. php:function:: show_404($page = '', $log_error = TRUE) +.. function:: show_404($page = '', $log_error = TRUE) :param string $page: URI string :param bool $log_error: Whether to log the error @@ -96,7 +96,7 @@ please see the :doc:`Error Handling ` documentation. log_message() ============= -.. php:function:: log_message($level, $message, $php_error = FALSE) +.. function:: log_message($level, $message, $php_error = FALSE) :param string $level: Log level: 'error', 'debug' or 'info' :param string $message: Message to log @@ -109,7 +109,7 @@ please see the :doc:`Error Handling ` documentation. set_status_header() =============================== -.. php:function:: set_status_header($code, $text = '') +.. function:: set_status_header($code, $text = '') :param int $code: HTTP Reponse status code :param string $text: A custom message to set with the status code @@ -126,7 +126,7 @@ a full list of headers. remove_invisible_characters() ============================= -.. php:function:: remove_invisible_characters($str, $url_encoded = TRUE) +.. function:: remove_invisible_characters($str, $url_encoded = TRUE) :param string $str: Input string :param bool $url_encoded: Whether to remove URL-encoded characters as well @@ -143,7 +143,7 @@ Example:: html_escape() ============= -.. php:function:: html_escape($var) +.. function:: html_escape($var) :param mixed $var: Variable to escape (string or array) @@ -157,7 +157,7 @@ It is useful in preventing Cross Site Scripting (XSS). get_mimes() =========== -.. php:function:: get_mimes() +.. function:: get_mimes() :returns: array @@ -167,7 +167,7 @@ This function returns a *reference* to the MIMEs array from is_https() ========== -.. php:function:: is_https() +.. function:: is_https() :returns: bool @@ -177,7 +177,7 @@ in any other case (including non-HTTP requests). function_usable() ================= -.. php:function:: function_usable($function_name) +.. function:: function_usable($function_name) :param string $function_name: Function name :returns: bool diff --git a/user_guide_src/source/general/errors.rst b/user_guide_src/source/general/errors.rst index f12d992f8..6cc8a0966 100644 --- a/user_guide_src/source/general/errors.rst +++ b/user_guide_src/source/general/errors.rst @@ -21,8 +21,8 @@ without having to worry about class/function scoping. CodeIgniter also returns a status code whenever a portion of the core calls ``exit()``. This exit status code is separate from the HTTP status code, and serves as a notice to other processes that may be watching of -whether the script completed successfully, or if not, what kind of -problem it encountered that caused it to abort. These values are +whether the script completed successfully, or if not, what kind of +problem it encountered that caused it to abort. These values are defined in *application/config/constants.php*. While exit status codes are most useful in CLI settings, returning the proper code helps server software keep track of your scripts and the health of your application. @@ -32,7 +32,7 @@ The following functions let you generate errors: show_error() ============ -.. php:function:: show_error($message, $status_code, $heading = 'An Error Was Encountered') +.. function:: show_error($message, $status_code, $heading = 'An Error Was Encountered') :param mixed $message: Error message :param int $status_code: HTTP Response status code @@ -49,13 +49,13 @@ code should be sent with the error. If ``$status_code`` is less than 100, the HTTP status code will be set to 500, and the exit status code will be set to ``$status_code + EXIT__AUTO_MIN``. If that value is larger than ``EXIT__AUTO_MAX``, or if ``$status_code`` is 100 or higher, the exit -status code will be set to ``EXIT_ERROR``. You can check in +status code will be set to ``EXIT_ERROR``. You can check in *application/config/constants.php* for more detail. show_404() ========== -.. php:function:: show_404($page = '', $log_error = TRUE) +.. function:: show_404($page = '', $log_error = TRUE) :param string $page: URI string :param bool $log_error: Whether to log the error @@ -77,7 +77,7 @@ optional second parameter to FALSE will skip logging. log_message() ============= -.. php:function:: log_message($level, $message, $php_error = FALSE) +.. function:: log_message($level, $message, $php_error = FALSE) :param string $level: Log level: 'error', 'debug' or 'info' :param string $message: Message to log diff --git a/user_guide_src/source/helpers/array_helper.rst b/user_guide_src/source/helpers/array_helper.rst index 9435b3ac7..90ead2942 100644 --- a/user_guide_src/source/helpers/array_helper.rst +++ b/user_guide_src/source/helpers/array_helper.rst @@ -19,7 +19,7 @@ The following functions are available: element() ========= -.. php:function:: element($item, $array, $default = NULL) +.. function:: element($item, $array, $default = NULL) :param string $item: Item to fetch from the array :param array $array: Input array @@ -39,13 +39,13 @@ Example:: 'size' => '' ); - echo element('color', $array); // returns "red" - echo element('size', $array, 'foobar'); // returns "foobar" + echo element('color', $array); // returns "red" + echo element('size', $array, 'foobar'); // returns "foobar" elements() ========== -.. php:function:: elements($items, $array, $default = NULL) +.. function:: elements($items, $array, $default = NULL) :param string $item: Item to fetch from the array :param array $array: Input array @@ -55,7 +55,7 @@ elements() Lets you fetch a number of items from an array. The function tests whether each of the array indices is set. If an index does not exist it is set to NULL, or whatever you've specified as the default value via -the third parameter. +the third parameter. Example:: @@ -106,7 +106,7 @@ updated. random_element() ================ -.. php:function:: random_element($array) +.. function:: random_element($array) :param array $array: Input array :returns: string (a random element from the array) diff --git a/user_guide_src/source/helpers/captcha_helper.rst b/user_guide_src/source/helpers/captcha_helper.rst index 3c56addf3..b40d8a252 100644 --- a/user_guide_src/source/helpers/captcha_helper.rst +++ b/user_guide_src/source/helpers/captcha_helper.rst @@ -20,7 +20,7 @@ The following functions are available: create_captcha() ================ -.. php:function:: function create_captcha($data = '', $img_path = '', $img_url = '', $font_path = '') +.. function:: function create_captcha($data = '', $img_path = '', $img_url = '', $font_path = '') :param array $data: Array of data for the CAPTCHA :param string $img_path: Path to create the image in @@ -132,7 +132,7 @@ CAPTCHA will be shown you'll have something like this:: $this->db->query($query); echo 'Submit the word you see below:'; - echo $cap['image']; + echo $cap['image']; echo ''; Then, on the page that accepts the submission you'll have something like diff --git a/user_guide_src/source/helpers/cookie_helper.rst b/user_guide_src/source/helpers/cookie_helper.rst index c41193c3c..c09f5eb4c 100644 --- a/user_guide_src/source/helpers/cookie_helper.rst +++ b/user_guide_src/source/helpers/cookie_helper.rst @@ -19,7 +19,7 @@ The following functions are available: set_cookie() ============ -.. php:function:: set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE, $httponly = FALSE) +.. function:: set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE, $httponly = FALSE) :param string $name: Cookie name :param string $value: Cookie value @@ -39,7 +39,7 @@ description of its use, as this function is an alias for get_cookie() ============ -.. php:function:: get_cookie($index = '', $xss_clean = FALSE) +.. function:: get_cookie($index = '', $xss_clean = FALSE) :param string $index: Cookie name :param bool $xss_clean: Whether to apply XSS filtering to the returned value @@ -52,7 +52,7 @@ description of itsuse, as this function is an alias for ``CI_Input::cookie()``. delete_cookie() =============== -.. php:function:: delete_cookie($name = '', $domain = '', $path = '/', $prefix = '') +.. function:: delete_cookie($name = '', $domain = '', $path = '/', $prefix = '') :param string $name: Cookie name :param string $domain: Cookie domain (usually: .yourdomain.com) diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index 5dfee8b48..67ead0330 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -18,7 +18,7 @@ The following functions are available: now() ===== -.. php:function:: now($timezone = NULL) +.. function:: now($timezone = NULL) :param string $timezone: Timezone :returns: int @@ -40,7 +40,7 @@ If a timezone is not provided, it will return ``time()`` based on the mdate() ======= -.. php:function:: mdate($datestr = '', $time = '') +.. function:: mdate($datestr = '', $time = '') :param string $datestr: Date string :param int $time: UNIX timestamp @@ -66,7 +66,7 @@ will be used. standard_date() =============== -.. php:function:: standard_date($fmt = 'DATE_RFC822', $time = NULL) +.. function:: standard_date($fmt = 'DATE_RFC822', $time = NULL) :param string $fmt: Date format :param int $time: UNIX timestamp @@ -109,7 +109,7 @@ DATE_W3C W3C 2005-08-14T16:13:03+0000 local_to_gmt() ============== -.. php:function:: local_to_gmt($time = '') +.. function:: local_to_gmt($time = '') :param int $time: UNIX timestamp :returns: string @@ -123,7 +123,7 @@ Example:: gmt_to_local() ============== -.. php:function:: gmt_to_local($time = '', $timezone = 'UTC', $dst = FALSE) +.. function:: gmt_to_local($time = '', $timezone = 'UTC', $dst = FALSE) :param int $time: UNIX timestamp :param string $timezone: Timezone @@ -147,7 +147,7 @@ Example:: mysql_to_unix() =============== -.. php:function:: mysql_to_unix($time = '') +.. function:: mysql_to_unix($time = '') :param int $time: UNIX timestamp :returns: int @@ -161,7 +161,7 @@ Example:: unix_to_human() =============== -.. php:function:: unix_to_human($time = '', $seconds = FALSE, $fmt = 'us') +.. function:: unix_to_human($time = '', $seconds = FALSE, $fmt = 'us') :param int $time: UNIX timestamp :param bool $seconds: Whether to show seconds @@ -190,7 +190,7 @@ Examples:: human_to_unix() =============== -.. php:function:: human_to_unix($datestr = '') +.. function:: human_to_unix($datestr = '') :param int $datestr: Date string :returns: int UNIX timestamp or FALSE on failure @@ -209,7 +209,7 @@ Example:: nice_date() =========== -.. php:function:: nice_date($bad_date = '', $format = FALSE) +.. function:: nice_date($bad_date = '', $format = FALSE) :param int $bad_date: The terribly formatted date-like string :param string $format: Date format to return (same as PHP's ``date()`` function) @@ -235,7 +235,7 @@ Example:: timespan() ========== -.. php:function:: timespan($seconds = 1, $time = '', $units = '') +.. function:: timespan($seconds = 1, $time = '', $units = '') :param int $seconds: Number of seconds :param string $time: UNIX timestamp @@ -269,7 +269,7 @@ Example:: days_in_month() =============== -.. php:function:: days_in_month($month = 0, $year = '') +.. function:: days_in_month($month = 0, $year = '') :param int $month: a numeric month :param int $year: a numeric year @@ -287,7 +287,7 @@ If the second parameter is empty, the current year will be used. date_range() ============ -.. php:function:: date_range($unix_start = '', $mixed = '', $is_unix = TRUE, $format = 'Y-m-d') +.. function:: date_range($unix_start = '', $mixed = '', $is_unix = TRUE, $format = 'Y-m-d') :param int $unix_start: UNIX timestamp of the range start date :param int $mixed: UNIX timestamp of the range end date or interval in days @@ -309,7 +309,7 @@ Example:: timezones() =========== -.. php:function:: timezones($tz = '') +.. function:: timezones($tz = '') :param string $tz: a numeric timezone :returns: string @@ -328,7 +328,7 @@ This function is useful when used with :php:func:`timezone_menu()`. timezone_menu() =============== -.. php:function:: timezone_menu($default = 'UTC', $class = '', $name = 'timezones', $attributes = '') +.. function:: timezone_menu($default = 'UTC', $class = '', $name = 'timezones', $attributes = '') :param string $default: Timezone :param string $class: Class name diff --git a/user_guide_src/source/helpers/download_helper.rst b/user_guide_src/source/helpers/download_helper.rst index 860c568b9..fd95f4f34 100644 --- a/user_guide_src/source/helpers/download_helper.rst +++ b/user_guide_src/source/helpers/download_helper.rst @@ -18,7 +18,7 @@ The following functions are available: force_download() ================ -.. php:function:: force_download($filename = '', $data = '', $set_mime = FALSE) +.. function:: force_download($filename = '', $data = '', $set_mime = FALSE) :param string $filename: Filename :param mixed $data: File contents diff --git a/user_guide_src/source/helpers/email_helper.rst b/user_guide_src/source/helpers/email_helper.rst index 10adf1d0e..b38e7ec46 100644 --- a/user_guide_src/source/helpers/email_helper.rst +++ b/user_guide_src/source/helpers/email_helper.rst @@ -22,7 +22,7 @@ The following functions are available: valid_email() ============= -.. php:function:: valid_email($email) +.. function:: valid_email($email) :param string $email: Email address :returns: bool @@ -49,7 +49,7 @@ Example:: send_email() ============ -.. php:function:: send_email($recipient, $subject, $message) +.. function:: send_email($recipient, $subject, $message) :param string $recipient: E-mail address :param string $subject: Mail subject diff --git a/user_guide_src/source/helpers/file_helper.rst b/user_guide_src/source/helpers/file_helper.rst index 194d4348f..be451db4d 100644 --- a/user_guide_src/source/helpers/file_helper.rst +++ b/user_guide_src/source/helpers/file_helper.rst @@ -18,7 +18,7 @@ The following functions are available: read_file() =========== -.. php:function:: read_file($file) +.. function:: read_file($file) :param string $file: File path :returns: string or FALSE on failure @@ -45,7 +45,7 @@ The path can be a relative or full server path. Returns FALSE (boolean) on failu write_file() ============ -.. php:function:: write_file($path, $data, $mode = 'wb') +.. function:: write_file($path, $data, $mode = 'wb') :param string $path: File path :param string $data: Data to write to file @@ -87,7 +87,7 @@ for mode options. delete_files() ============== -.. php:function:: delete_files($path, $del_dir = FALSE, $htdocs = FALSE) +.. function:: delete_files($path, $del_dir = FALSE, $htdocs = FALSE) :param string $path: Directory path :param bool $del_dir: Whether to also delete directories @@ -112,7 +112,7 @@ Example:: get_filenames() =============== -.. php:function:: get_filenames($source_dir, $include_path = FALSE) +.. function:: get_filenames($source_dir, $include_path = FALSE) :param string $source_dir: Directory path :param bool $include_path: Whether to include the path as part of the filenames @@ -129,7 +129,7 @@ Example:: get_dir_file_info() =================== -.. php:function:: get_dir_file_info($source_dir, $top_level_only) +.. function:: get_dir_file_info($source_dir, $top_level_only) :param string $source_dir: Directory path :param bool $top_level_only: Whether to look only at the specified directory @@ -148,7 +148,7 @@ Example:: get_file_info() =============== -.. php:function: get_file_info($file, $returned_values = array('name', 'server_path', 'size', 'date')) +.. function: get_file_info($file, $returned_values = array('name', 'server_path', 'size', 'date')) :param string $file: File path :param array $returned_values: What type of info to return @@ -168,7 +168,7 @@ Valid ``$returned_values`` options are: `name`, `size`, `date`, `readable`, `wri get_mime_by_extension() ======================= -.. php:function:: get_mime_by_extension($filename) +.. function:: get_mime_by_extension($filename) :param string $filename: File name :returns: string or FALSE on failure @@ -188,7 +188,7 @@ Returns FALSE if it can't determine the type, or read the MIME config file. symbolic_permissions() ====================== -.. php:function:: symbolic_permissions($perms) +.. function:: symbolic_permissions($perms) :param int $perms: Permissions :returns: string @@ -203,7 +203,7 @@ standard symbolic notation of file permissions. octal_permissions() =================== -.. php:function:: octal_permissions($perms) +.. function:: octal_permissions($perms) :param int $perms: Permissions :returns: string diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index b2a9b6f0f..e88a5de87 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -19,7 +19,7 @@ The following functions are available: form_open() =========== -.. php:function:: form_open($action = '', $attributes = '', $hidden = array()) +.. function:: form_open($action = '', $attributes = '', $hidden = array()) :param string $action: Form action/target URI string :param string $attributes: HTML attributes @@ -74,7 +74,7 @@ The above example would create a form similar to this:: form_open_multipart() ===================== -.. php:function:: form_open_multipart($action = '', $attributes = array(), $hidden = array()) +.. function:: form_open_multipart($action = '', $attributes = array(), $hidden = array()) :param string $action: Form action/target URI string :param string $attributes: HTML attributes @@ -88,7 +88,7 @@ would like to use the form to upload files with. form_hidden() ============= -.. php:function:: form_hidden($name, $value = '') +.. function:: form_hidden($name, $value = '') :param string $name: Field name :param string $value: Field value @@ -156,7 +156,7 @@ If you want to create hidden input fields with extra attributes:: form_input() ============ -.. php:function:: form_input($data = '', $value = '', $extra = '') +.. function:: form_input($data = '', $value = '', $extra = '') :param array $data: Field attributes data :param string $value: Field value @@ -197,7 +197,7 @@ JavaScript, you can pass it as a string in the third parameter:: form_password() =============== -.. php:function:: form_password($data = '', $value = '', $extra = '') +.. function:: form_password($data = '', $value = '', $extra = '') :param array $data: Field attributes data :param string $value: Field value @@ -210,7 +210,7 @@ function above except that it uses the "password" input type. form_upload() ============= -.. php:function:: form_upload($data = '', $value = '', $extra = '') +.. function:: form_upload($data = '', $value = '', $extra = '') :param array $data: Field attributes data :param string $value: Field value @@ -224,7 +224,7 @@ be used to upload files. form_textarea() =============== -.. php:function:: form_textarea($data = '', $value = '', $extra = '') +.. function:: form_textarea($data = '', $value = '', $extra = '') :param array $data: Field attributes data :param string $value: Field value @@ -240,7 +240,7 @@ function above except that it generates a "textarea" type. form_dropdown() =============== -.. php:function:: form_dropdown($name = '', $options = array(), $selected = array(), $extra = '') +.. function:: form_dropdown($name = '', $options = array(), $selected = array(), $extra = '') :param string $name: Field name :param array $options: An associative array of options to be listed @@ -305,7 +305,7 @@ label. form_multiselect() ================== -.. php:function:: form_multiselect($name = '', $options = array(), $selected = array(), $extra = '') +.. function:: form_multiselect($name = '', $options = array(), $selected = array(), $extra = '') :param string $name: Field name :param array $options: An associative array of options to be listed @@ -325,7 +325,7 @@ syntax, e.g. foo[]. form_fieldset() =============== -.. php:function:: form_fieldset($legend_text = '', $attributes = array()) +.. function:: form_fieldset($legend_text = '', $attributes = array()) :param string $legend_text: Text to put in the tag :param array $attributes: Attributes to be set on the
tag @@ -372,7 +372,7 @@ second parameter if you prefer to set additional attributes:: form_fieldset_close() ===================== -.. php:function:: form_fieldset_close($extra = '') +.. function:: form_fieldset_close($extra = '') :param string $extra: Anything to append after the closing tag, *as is* :returns: string @@ -390,7 +390,7 @@ the tag. For example form_checkbox() =============== -.. php:function:: form_checkbox($data = '', $value = '', $checked = FALSE, $extra = '') +.. function:: form_checkbox($data = '', $value = '', $checked = FALSE, $extra = '') :param array $data: Field attributes data :param string $value: Field value @@ -432,7 +432,7 @@ fourth parameter:: form_radio() ============ -.. php:function:: form_radio($data = '', $value = '', $checked = FALSE, $extra = '') +.. function:: form_radio($data = '', $value = '', $checked = FALSE, $extra = '') :param array $data: Field attributes data :param string $value: Field value @@ -446,7 +446,7 @@ function above except that it uses the "radio" input type. form_label() ============ -.. php:function:: form_label($label_text = '', $id = '', $attributes = array()) +.. function:: form_label($label_text = '', $id = '', $attributes = array()) :param string $label_text: Text to put in the