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 --- user_guide_src/source/helpers/path_helper.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src/source/helpers/path_helper.rst') diff --git a/user_guide_src/source/helpers/path_helper.rst b/user_guide_src/source/helpers/path_helper.rst index 3a271b28f..863a5589e 100644 --- a/user_guide_src/source/helpers/path_helper.rst +++ b/user_guide_src/source/helpers/path_helper.rst @@ -19,7 +19,7 @@ The following functions are available: set_realpath() ============== -.. php:function:: set_realpath($path, $check_existance = FALSE) +.. function:: set_realpath($path, $check_existance = FALSE) :param string $path: Path :param bool $check_existance: Whether to check if the path actually exists @@ -40,7 +40,7 @@ Examples:: $directory = '/etc/php5'; echo set_realpath($directory); // Prints '/etc/php5/' - + $non_existent_directory = '/path/to/nowhere'; echo set_realpath($non_existent_directory, TRUE); // Shows an error, as the path cannot be resolved echo set_realpath($non_existent_directory, FALSE); // Prints '/path/to/nowhere' \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 6851be175d1e7ab804a47d41d78807bef9805866 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 19 Jul 2013 16:47:12 -0700 Subject: Update Path helper docs --- user_guide_src/source/helpers/path_helper.rst | 42 +++++++++++++++------------ 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'user_guide_src/source/helpers/path_helper.rst') diff --git a/user_guide_src/source/helpers/path_helper.rst b/user_guide_src/source/helpers/path_helper.rst index 863a5589e..61877d75b 100644 --- a/user_guide_src/source/helpers/path_helper.rst +++ b/user_guide_src/source/helpers/path_helper.rst @@ -5,7 +5,12 @@ Path Helper The Path Helper file contains functions that permits you to work with file paths on the server. -.. contents:: Page Contents +.. contents:: + :local: + +.. raw:: html + +
Loading this Helper =================== @@ -14,33 +19,34 @@ This helper is loaded using the following code:: $this->load->helper('path'); +Available Functions +=================== + The following functions are available: -set_realpath() -============== -.. function:: set_realpath($path, $check_existance = FALSE) +.. function:: set_realpath($path[, $check_existance = FALSE]) :param string $path: Path :param bool $check_existance: Whether to check if the path actually exists :returns: string -This function will return a server path without symbolic links or -relative directory structures. An optional second argument will -cause an error to be triggered if the path cannot be resolved. + This function will return a server path without symbolic links or + relative directory structures. An optional second argument will + cause an error to be triggered if the path cannot be resolved. -Examples:: + Examples:: - $file = '/etc/php5/apache2/php.ini'; - echo set_realpath($file); // Prints '/etc/php5/apache2/php.ini' + $file = '/etc/php5/apache2/php.ini'; + echo set_realpath($file); // Prints '/etc/php5/apache2/php.ini' - $non_existent_file = '/path/to/non-exist-file.txt'; - echo set_realpath($non_existent_file, TRUE); // Shows an error, as the path cannot be resolved - echo set_realpath($non_existent_file, FALSE); // Prints '/path/to/non-exist-file.txt' + $non_existent_file = '/path/to/non-exist-file.txt'; + echo set_realpath($non_existent_file, TRUE); // Shows an error, as the path cannot be resolved + echo set_realpath($non_existent_file, FALSE); // Prints '/path/to/non-exist-file.txt' - $directory = '/etc/php5'; - echo set_realpath($directory); // Prints '/etc/php5/' + $directory = '/etc/php5'; + echo set_realpath($directory); // Prints '/etc/php5/' - $non_existent_directory = '/path/to/nowhere'; - echo set_realpath($non_existent_directory, TRUE); // Shows an error, as the path cannot be resolved - echo set_realpath($non_existent_directory, FALSE); // Prints '/path/to/nowhere' \ No newline at end of file + $non_existent_directory = '/path/to/nowhere'; + echo set_realpath($non_existent_directory, TRUE); // Shows an error, as the path cannot be resolved + echo set_realpath($non_existent_directory, FALSE); // Prints '/path/to/nowhere' \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 3de130c2da3b93a3404f264e92d7b65354de3548 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Feb 2014 23:31:49 +0200 Subject: [ci skip] Add return types to helper docs (+ some other formatting) --- user_guide_src/source/helpers/path_helper.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'user_guide_src/source/helpers/path_helper.rst') diff --git a/user_guide_src/source/helpers/path_helper.rst b/user_guide_src/source/helpers/path_helper.rst index 61877d75b..705ca23b9 100644 --- a/user_guide_src/source/helpers/path_helper.rst +++ b/user_guide_src/source/helpers/path_helper.rst @@ -29,7 +29,8 @@ The following functions are available: :param string $path: Path :param bool $check_existance: Whether to check if the path actually exists - :returns: string + :returns: An absolute path + :rtype: string This function will return a server path without symbolic links or relative directory structures. An optional second argument will -- cgit v1.2.3-24-g4f1b