From 024cfeceedc17fc8442b2bca9dfc73c361dfaac3 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Wed, 9 Jan 2013 18:10:20 +0100 Subject: Syntax fixes in documentation source --- .../source/general/creating_libraries.rst | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'user_guide_src/source/general/creating_libraries.rst') diff --git a/user_guide_src/source/general/creating_libraries.rst b/user_guide_src/source/general/creating_libraries.rst index 8bafd4532..4fc8ed72f 100644 --- a/user_guide_src/source/general/creating_libraries.rst +++ b/user_guide_src/source/general/creating_libraries.rst @@ -148,30 +148,30 @@ take full advantage of the OOP principles. So, in order to be able to use the CodeIgniter super-object in all of the class methods, you're encouraged to assign it to a property instead:: -class Example_library { + class Example_library { - protected $CI; + protected $CI; - // We'll use a constructor, as you can't directly call a function - // from a property definition. - public function __construct() - { - // Assign the CodeIgniter super-object - $this->CI =& get_instance(); - } + // We'll use a constructor, as you can't directly call a function + // from a property definition. + public function __construct() + { + // Assign the CodeIgniter super-object + $this->CI =& get_instance(); + } - public function foo() - { - $this->CI->load->helper('url'); - redirect(); - } + public function foo() + { + $this->CI->load->helper('url'); + redirect(); + } - public function bar() - { - echo $this->CI->config_item('base_url'); - } + public function bar() + { + echo $this->CI->config_item('base_url'); + } -} + } Replacing Native Libraries with Your Versions ============================================= -- cgit v1.2.3-24-g4f1b