Add method chaining support to CI_Table
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index f90fa42..4a54593 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -387,7 +387,11 @@
- Added check to detect if robots are pretending to be mobile clients (helps with e.g. Google indexing mobile website versions).
- Added method ``parse()`` to allow parsing a custom user-agent string, different from the current visitor's.
- - Added support for setting :doc:`Table <libraries/table>` class defaults in a config file.
+ - :doc:`HTML Table Library <libraries/table>` changes include:
+
+ - Added method chaining support.
+ - Added support for setting table class defaults in a config file.
+
- :doc:`Zip Library <libraries/zip>` method ``read_file()`` can now also alter the original file path/name while adding files to an archive.
- Core
diff --git a/user_guide_src/source/libraries/table.rst b/user_guide_src/source/libraries/table.rst
index ea0c417..6e01108 100644
--- a/user_guide_src/source/libraries/table.rst
+++ b/user_guide_src/source/libraries/table.rst
@@ -167,7 +167,8 @@
.. method:: set_caption($caption)
:param string $caption: Table caption
- :rtype: void
+ :returns: CI_Table instance (method chaining)
+ :rtype: CI_Table
Permits you to add a caption to the table.
::
@@ -177,7 +178,8 @@
.. method:: set_heading([$args = array()[, ...]])
:param mixed $args: An array or multiple strings containing the table column titles
- :rtype: void
+ :returns: CI_Table instance (method chaining)
+ :rtype: CI_Table
Permits you to set the table heading. You can submit an array or discrete params::
@@ -188,7 +190,8 @@
.. method:: add_row([$args = array()[, ...]])
:param mixed $args: An array or multiple strings containing the row values
- :rtype: void
+ :returns: CI_Table instance (method chaining)
+ :rtype: CI_Table
Permits you to add a row to your table. You can submit an array or discrete params::
@@ -253,7 +256,8 @@
.. method:: set_empty($value)
:param mixed $value: Value to put in empty cells
- :rtype: void
+ :returns: CI_Table instance (method chaining)
+ :rtype: CI_Table
Lets you set a default value for use in any table cells that are empty.
You might, for example, set a non-breaking space::
@@ -262,7 +266,8 @@
.. method:: clear()
- :rtype: void
+ :returns: CI_Table instance (method chaining)
+ :rtype: CI_Table
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::