From f964b16f3db95d655420dfae2012ee9fbb98a1a8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Nov 2013 17:04:55 +0200 Subject: Deprecate CI_Input::is_cli_request() and add common function is_cli() to replace it Calls to this function are often needed before the Input library is available --- user_guide_src/source/installation/upgrade_300.rst | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'user_guide_src/source/installation') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index e8fdd0b15..8f9cc1bdc 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -457,4 +457,28 @@ then you can now just access the properties instead:: $this->router->method; .. note:: Those methods are still available, but you're strongly encouraged to remove their usage + sooner rather than later. + +Input library method is_cli_request() +===================================== + +Calls to the ``CI_Input::is_cli_request()`` method are necessary at many places +in the CodeIgniter internals and this is often before the :doc:`Input Library +<../libraries/input>` is loaded. Because of that, it is being replaced by a common +function named :php:func:`is_cli()` and this method is now just an alias. + +The new function is both available at all times for you to use and shorter to type. + +:: + + // Old + $this->input->is_cli_request(); + + // New + is_cli(); + +``CI_Input::is_cli_request()`` is now now deprecated and scheduled for removal in +CodeIgniter 3.1+. + +.. note:: This method is still available, but you're strongly encouraged to remove its usage sooner rather than later. \ No newline at end of file -- cgit v1.2.3-24-g4f1b