`_
will not be supported.
::
@@ -397,6 +440,25 @@ Class Reference
Checks to see if the HTTP_X_REQUESTED_WITH server header has been
set, and returns boolean TRUE if it is or FALSE if not.
+ .. php:method:: is_cli_request()
+
+ :returns: TRUE if it is a CLI request, FALSE if not
+ :rtype: bool
+
+ Checks to see if the application was run from the command-line
+ interface.
+
+ .. note:: This method checks both the PHP SAPI name currently in use
+ and if the ``STDIN`` constant is defined, which is usually a
+ failsafe way to see if PHP is being run via the command line.
+
+ ::
+
+ $this->input->is_cli_request()
+
+ .. note:: This method is DEPRECATED and is now just an alias for the
+ :func:`is_cli()` function.
+
.. php:method:: method([$upper = FALSE])
:param bool $upper: Whether to return the request method name in upper or lower case
diff --git a/user_guide_src/source/libraries/javascript.rst b/user_guide_src/source/libraries/javascript.rst
new file mode 100644
index 00000000000..e91b9ad7835
--- /dev/null
+++ b/user_guide_src/source/libraries/javascript.rst
@@ -0,0 +1,322 @@
+################
+Javascript Class
+################
+
+CodeIgniter provides a library to help you with certain common functions
+that you may want to use with Javascript. Please note that CodeIgniter
+does not require the jQuery library to run, and that any scripting
+library will work equally well. The jQuery library is simply presented
+as a convenience if you choose to use it.
+
+.. important:: This library is DEPRECATED and should not be used. It has always
+ been with an 'experimental' status and is now no longer supported.
+ Currently only kept for backwards compatibility.
+
+.. contents::
+ :local:
+
+.. raw:: html
+
+
+
+**************************
+Using the Javascript Class
+**************************
+
+Initializing the Class
+======================
+
+To initialize the Javascript class manually in your controller
+constructor, use the ``$this->load->library()`` method. Currently,
+the only available library is jQuery, which will automatically be
+loaded like this::
+
+ $this->load->library('javascript');
+
+The Javascript class also accepts parameters:
+
+- js_library_driver (string) *default: 'jquery'*
+- autoload (bool) *default: TRUE*
+
+You may override the defaults by sending an associative array::
+
+ $this->load->library(
+ 'javascript',
+ array(
+ 'js_library_driver' => 'scripto',
+ 'autoload' => FALSE
+ )
+ );
+
+Again, presently only 'jquery' is available. You may wish to set
+autoload to FALSE, though, if you do not want the jQuery library to
+automatically include a script tag for the main jQuery script file. This
+is useful if you are loading it from a location outside of CodeIgniter,
+or already have the script tag in your markup.
+
+Once loaded, the jQuery library object will be available using:
+
+ $this->javascript
+
+Setup and Configuration
+=======================
+
+Set these variables in your view
+--------------------------------
+
+As a Javascript library, your files must be available to your
+application.
+
+As Javascript is a client side language, the library must be able to
+write content into your final output. This generally means a view.
+You'll need to include the following variables in the ````
+sections of your output.
+
+::
+
+
+
+
+
+``$library_src``, is where the actual library file will be loaded, as
+well as any subsequent plugin script calls; $script_head is where
+specific events, functions and other commands will be rendered.
+
+Set the path to the librarys with config items
+----------------------------------------------
+
+There are some configuration items in Javascript library. These can
+either be set in *application/config.php*, within its own
+*config/javascript.php* file, or within any controller usings the
+``set_item()`` function.
+
+An image to be used as an "ajax loader", or progress indicator. Without
+one, the simple text message of "loading" will appear when Ajax calls
+need to be made.
+
+::
+
+ $config['javascript_location'] = 'http://localhost/codeigniter/themes/js/jquery/';
+ $config['javascript_ajax_img'] = 'images/ajax-loader.gif';
+
+If you keep your files in the same directories they were downloaded
+from, then you need not set this configuration items.
+
+The jQuery Class
+================
+
+To initialize the jQuery class manually in your controller constructor,
+use the ``$this->load->library()`` method::
+
+ $this->load->library('javascript/jquery');
+
+You may send an optional parameter to determine whether or not a script
+tag for the main jQuery file will be automatically included when loading
+the library. It will be created by default. To prevent this, load the
+library as follows::
+
+ $this->load->library('javascript/jquery', FALSE);
+
+Once loaded, the jQuery library object will be available using:
+
+ $this->jquery
+
+jQuery Events
+=============
+
+Events are set using the following syntax.
+::
+
+ $this->jquery->event('element_path', code_to_run());
+
+In the above example:
+
+- "event" is any of blur, change, click, dblclick, error, focus, hover,
+ keydown, keyup, load, mousedown, mouseup, mouseover, mouseup, resize,
+ scroll, or unload.
+- "element_path" is any valid `jQuery selector
+ `_. Due to jQuery's unique
+ selector syntax, this is usually an element id, or CSS selector. For
+ example "#notice_area" would effect ````, and
+ "#content a.notice" would effect all anchors with a class of "notice"
+ in the div with id "content".
+- "``code_to_run()``" is script your write yourself, or an action such as
+ an effect from the jQuery library below.
+
+Effects
+=======
+
+The query library supports a powerful
+`Effects `_ repertoire. Before an effect
+can be used, it must be loaded::
+
+ $this->jquery->effect([optional path] plugin name); // for example $this->jquery->effect('bounce');
+
+
+hide() / show()
+---------------
+
+Each of this functions will affect the visibility of an item on your
+page. hide() will set an item invisible, show() will reveal it.
+
+::
+
+ $this->jquery->hide(target, optional speed, optional extra information);
+ $this->jquery->show(target, optional speed, optional extra information);
+
+
+- "target" will be any valid jQuery selector or selectors.
+- "speed" is optional, and is set to either slow, normal, fast, or
+ alternatively a number of milliseconds.
+- "extra information" is optional, and could include a callback, or
+ other additional information.
+
+toggle()
+--------
+
+toggle() will change the visibility of an item to the opposite of its
+current state, hiding visible elements, and revealing hidden ones.
+
+::
+
+ $this->jquery->toggle(target);
+
+
+- "target" will be any valid jQuery selector or selectors.
+
+animate()
+---------
+
+::
+
+ $this->jquery->animate(target, parameters, optional speed, optional extra information);
+
+
+- "target" will be any valid jQuery selector or selectors.
+- "parameters" in jQuery would generally include a series of CSS
+ properties that you wish to change.
+- "speed" is optional, and is set to either slow, normal, fast, or
+ alternatively a number of milliseconds.
+- "extra information" is optional, and could include a callback, or
+ other additional information.
+
+For a full summary, see
+`http://api.jquery.com/animate/ `_
+
+Here is an example of an animate() called on a div with an id of "note",
+and triggered by a click using the jQuery library's click() event.
+
+::
+
+ $params = array(
+ 'height' => 80,
+ 'width' => '50%',
+ 'marginLeft' => 125
+ );
+ $this->jquery->click('#trigger', $this->jquery->animate('#note', $params, 'normal'));
+
+fadeIn() / fadeOut()
+--------------------
+
+::
+
+ $this->jquery->fadeIn(target, optional speed, optional extra information);
+ $this->jquery->fadeOut(target, optional speed, optional extra information);
+
+
+- "target" will be any valid jQuery selector or selectors.
+- "speed" is optional, and is set to either slow, normal, fast, or
+ alternatively a number of milliseconds.
+- "extra information" is optional, and could include a callback, or
+ other additional information.
+
+toggleClass()
+-------------
+
+This function will add or remove a CSS class to its target.
+
+::
+
+ $this->jquery->toggleClass(target, class)
+
+
+- "target" will be any valid jQuery selector or selectors.
+- "class" is any CSS classname. Note that this class must be defined
+ and available in a CSS that is already loaded.
+
+fadeIn() / fadeOut()
+--------------------
+
+These effects cause an element(s) to disappear or reappear over time.
+
+::
+
+ $this->jquery->fadeIn(target, optional speed, optional extra information);
+ $this->jquery->fadeOut(target, optional speed, optional extra information);
+
+
+- "target" will be any valid jQuery selector or selectors.
+- "speed" is optional, and is set to either slow, normal, fast, or
+ alternatively a number of milliseconds.
+- "extra information" is optional, and could include a callback, or
+ other additional information.
+
+slideUp() / slideDown() / slideToggle()
+---------------------------------------
+
+These effects cause an element(s) to slide.
+
+::
+
+ $this->jquery->slideUp(target, optional speed, optional extra information);
+ $this->jquery->slideDown(target, optional speed, optional extra information);
+ $this->jquery->slideToggle(target, optional speed, optional extra information);
+
+
+- "target" will be any valid jQuery selector or selectors.
+- "speed" is optional, and is set to either slow, normal, fast, or
+ alternatively a number of milliseconds.
+- "extra information" is optional, and could include a callback, or
+ other additional information.
+
+Plugins
+=======
+
+Some select jQuery plugins are made available using this library.
+
+corner()
+--------
+
+Used to add distinct corners to page elements. For full details see
+`http://malsup.com/jquery/corner/ `_
+
+::
+
+ $this->jquery->corner(target, corner_style);
+
+
+- "target" will be any valid jQuery selector or selectors.
+- "corner_style" is optional, and can be set to any valid style such
+ as round, sharp, bevel, bite, dog, etc. Individual corners can be set
+ by following the style with a space and using "tl" (top left), "tr"
+ (top right), "bl" (bottom left), or "br" (bottom right).
+
+::
+
+ $this->jquery->corner("#note", "cool tl br");
+
+
+tablesorter()
+-------------
+
+description to come
+
+modal()
+-------
+
+description to come
+
+calendar()
+----------
+
+description to come
\ No newline at end of file
diff --git a/user_guide_src/source/libraries/language.rst b/user_guide_src/source/libraries/language.rst
index 262d9733ab6..de17c82888f 100644
--- a/user_guide_src/source/libraries/language.rst
+++ b/user_guide_src/source/libraries/language.rst
@@ -92,7 +92,7 @@ Internationalization
The Language class in CodeIgniter is meant to provide an easy and lightweight
way to support multiplelanguages in your application. It is not meant to be a
full implementation of what is commonly called `internationalization and localization
-`_.
+`_.
We use the term "idiom" to refer to a language using its common name,
rather than using any of the international standards, such as "en", "en-US",
diff --git a/user_guide_src/source/libraries/loader.rst b/user_guide_src/source/libraries/loader.rst
index 4d3d512361d..22abb4586db 100644
--- a/user_guide_src/source/libraries/loader.rst
+++ b/user_guide_src/source/libraries/loader.rst
@@ -238,7 +238,7 @@ Class Reference
The second **optional** parameter can take an associative array or an
object as input, which it runs through the PHP
- `extract() `_ function to convert to variables
+ `extract() `_ function to convert to variables
that can be used in your view files. Again, read the
:doc:`Views <../general/views>` page to learn how this might be useful.
@@ -259,7 +259,7 @@ Class Reference
:rtype: CI_Loader
This method takes an associative array as input and generates
- variables using the PHP `extract() `_
+ variables using the PHP `extract() `_
function. This method produces the same result as using the second
parameter of the ``$this->load->view()`` method above. The reason you
might want to use this method independently is if you would like to
diff --git a/user_guide_src/source/libraries/output.rst b/user_guide_src/source/libraries/output.rst
index a24f3cb5201..92060f66a8e 100644
--- a/user_guide_src/source/libraries/output.rst
+++ b/user_guide_src/source/libraries/output.rst
@@ -163,7 +163,7 @@ Class Reference
$this->output->set_status_header(401);
// Sets the header as: Unauthorized
- `See here `_ for a full list of headers.
+ `See here `_ for a full list of headers.
.. note:: This method is an alias for :doc:`Common function <../general/common_functions>`
:func:`set_status_header()`.
@@ -207,7 +207,7 @@ Class Reference
For more information, please see the :doc:`caching documentation <../general/caching>`.
- .. php:method:: _display([$output = NULL])
+ .. php:method:: _display([$output = ''])
:param string $output: Output data override
:returns: void
diff --git a/user_guide_src/source/libraries/parser.rst b/user_guide_src/source/libraries/parser.rst
index 43ef5ee5682..0b0d4174083 100644
--- a/user_guide_src/source/libraries/parser.rst
+++ b/user_guide_src/source/libraries/parser.rst
@@ -9,7 +9,7 @@ It can parse simple variables or variable tag pairs.
If you've never used a template engine,
pseudo-variable names are enclosed in braces, like this::
-
+
{blog_title}
@@ -95,7 +95,7 @@ you would like an entire block of variables to be repeated, with each
iteration containing new values? Consider the template example we showed
at the top of the page::
-
+
{blog_title}
diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst
index f2236c633a6..994dc2e080f 100644
--- a/user_guide_src/source/libraries/sessions.rst
+++ b/user_guide_src/source/libraries/sessions.rst
@@ -112,7 +112,7 @@ Session data is simply an array associated with a particular session ID
(cookie).
If you've used sessions in PHP before, you should be familiar with PHP's
-`$_SESSION superglobal `_
+`$_SESSION superglobal `_
(if not, please read the content on that link).
CodeIgniter gives access to its session data through the same means, as it
@@ -391,7 +391,7 @@ Destroying a Session
====================
To clear the current session (for example, during a logout), you may
-simply use either PHP's `session_destroy() `_
+simply use either PHP's `session_destroy() `_
function, or the ``sess_destroy()`` method. Both will work in exactly the
same way::
@@ -516,7 +516,7 @@ mind that it is in fact not the same code and it has some limitations
To be more specific, it doesn't support PHP's `directory level and mode
formats used in session.save_path
-`_,
+`_,
and it has most of the options hard-coded for safety. Instead, only
absolute paths are supported for ``$config['sess_save_path']``.
@@ -554,7 +554,7 @@ increase - which is the time when it matters - the file system will
consistently outperform almost all relational database setups.
In addition, if performance is your only concern, you may want to look
-into using `tmpfs `_,
+into using `tmpfs `_,
(warning: external resource), which can make your sessions blazing fast.
Database Driver
@@ -679,7 +679,7 @@ Memcached Driver
The 'memcached' driver is very similar to the 'redis' one in all of its
properties, except perhaps for availability, because PHP's `Memcached
-`_ extension is distributed via PECL and some
+`_ extension is distributed via PECL and some
Linux distrubutions make it available as an easy to install package.
Other than that, and without any intentional bias towards Redis, there's
@@ -754,7 +754,7 @@ when creating a session driver for CodeIgniter:
- Implement the `SessionHandlerInterface
- `_ interface.
+ `_ interface.
.. note:: You may notice that ``SessionHandlerInterface`` is provided
by PHP since version 5.4.0. CodeIgniter will automatically declare
@@ -1016,7 +1016,7 @@ Class Reference
.. note:: This method is just an alias for PHP's native
`session_regenerate_id()
- `_ function.
+ `_ function.
.. php:method:: sess_destroy()
@@ -1030,7 +1030,7 @@ Class Reference
.. note:: This method is just an alias for PHP's native
`session_destroy()
- `_ function.
+ `_ function.
.. php:method:: __get($key)
diff --git a/user_guide_src/source/libraries/table.rst b/user_guide_src/source/libraries/table.rst
index 06dfe59de09..91ae1ae8dbd 100644
--- a/user_guide_src/source/libraries/table.rst
+++ b/user_guide_src/source/libraries/table.rst
@@ -275,16 +275,11 @@ Class Reference
:returns: CI_Table instance (method chaining)
:rtype: CI_Table
- Lets you clear the table heading, row data and caption. If
- you need to show multiple tables with different data you
- should to call this method after each table has been
- generated to clear the previous table information.
-
- Example ::
+ Lets you clear the table heading and row data. If you need to show multiple tables with different data you should to call this method
+ after each table has been generated to clear the previous table information. Example::
$this->load->library('table');
- $this->table->set_caption('Preferences');
$this->table->set_heading('Name', 'Color', 'Size');
$this->table->add_row('Fred', 'Blue', 'Small');
$this->table->add_row('Mary', 'Red', 'Large');
@@ -294,7 +289,6 @@ Class Reference
$this->table->clear();
- $this->table->set_caption('Shipping');
$this->table->set_heading('Name', 'Day', 'Delivery');
$this->table->add_row('Fred', 'Wednesday', 'Express');
$this->table->add_row('Mary', 'Monday', 'Air');
diff --git a/user_guide_src/source/libraries/trackback.rst b/user_guide_src/source/libraries/trackback.rst
index abc608b7dc2..dc4477e9f1e 100644
--- a/user_guide_src/source/libraries/trackback.rst
+++ b/user_guide_src/source/libraries/trackback.rst
@@ -6,7 +6,7 @@ The Trackback Class provides functions that enable you to send and
receive Trackback data.
If you are not familiar with Trackbacks you'll find more information
-`here `_.
+`here `_.
.. contents::
:local:
diff --git a/user_guide_src/source/libraries/xmlrpc.rst b/user_guide_src/source/libraries/xmlrpc.rst
index a9a899d7b31..2fe07c49def 100644
--- a/user_guide_src/source/libraries/xmlrpc.rst
+++ b/user_guide_src/source/libraries/xmlrpc.rst
@@ -73,7 +73,7 @@ information:
- The *request* data (explained below).
Here is a basic example that sends a simple Weblogs.com ping to the
-`Ping-o-Matic `_
+`Ping-o-Matic `_
::
diff --git a/user_guide_src/source/overview/at_a_glance.rst b/user_guide_src/source/overview/at_a_glance.rst
index d5e5bf9291f..742d7bd0e47 100644
--- a/user_guide_src/source/overview/at_a_glance.rst
+++ b/user_guide_src/source/overview/at_a_glance.rst
@@ -111,4 +111,4 @@ CodeIgniter has a Friendly Community of Users
=============================================
Our growing community of users can be seen actively participating in our
-`Community Forums `_.
+`Community Forums `_.
diff --git a/user_guide_src/source/overview/getting_started.rst b/user_guide_src/source/overview/getting_started.rst
index a5181d96d9e..04ee50df736 100644
--- a/user_guide_src/source/overview/getting_started.rst
+++ b/user_guide_src/source/overview/getting_started.rst
@@ -19,6 +19,6 @@ Reference** and **Helper Reference** pages to learn to utilize the
native libraries and helper files.
Feel free to take advantage of our `Community
-Forums `_ if you have questions or
+Forums `_ if you have questions or
problems, and our `Wiki `_ to see code
examples posted by other users.
diff --git a/user_guide_src/source/tutorial/conclusion.rst b/user_guide_src/source/tutorial/conclusion.rst
index fa41c4492fb..0d90cde6f62 100644
--- a/user_guide_src/source/tutorial/conclusion.rst
+++ b/user_guide_src/source/tutorial/conclusion.rst
@@ -20,7 +20,7 @@ CodeIgniter within a few days.
If you still have questions about the framework or your own CodeIgniter
code, you can:
-- Check out our `forums `_
+- Check out our `forums `_
- Visit our `IRC chatroom `_
- Explore the `Wiki `_
diff --git a/user_guide_src/source/tutorial/static_pages.rst b/user_guide_src/source/tutorial/static_pages.rst
index 8db105555b2..561082a4897 100644
--- a/user_guide_src/source/tutorial/static_pages.rst
+++ b/user_guide_src/source/tutorial/static_pages.rst
@@ -58,7 +58,7 @@ the following code:
::
-
+
CodeIgniter Tutorial