Welcome Guest, Not a member yet? Register   Sign In
User Guide: May add a note in Creating Libraries
#1

[eluser]Kromack[/eluser]
Here : http://ellislab.com/codeigniter/user-gui...aries.html
Quote:Loading Your Sub-class

To load your sub-class you'll use the standard syntax normally used. DO NOT include your prefix. For example, to load the example above, which extends the Email class, you will use:
$this->load->library('email');

Once loaded you will use the class variable as you normally would for the class you are extending. In the case of the email class all calls will use:
$this->email->some_function();

When extending CI_Exceptions library it seems that using $this->load->library('exceptions'); produce an error :

Code:
Fatal error: Cannot redeclare class CI_Exceptions in system/libraries/Exceptions.php on line 27

This error have been reported :
Here
And here

So you may can add a note that tell to don't load manually the library when extending CI_ libraries ?

EDIT : sorry it seems to doesn't work too without the loading.




Theme © iAndrew 2016 - Forum software by © MyBB