Welcome Guest, Not a member yet? Register   Sign In
Loading custom libraries
#4

[eluser]CroNiX[/eluser]
[quote author="skaterdav85" date="1286965878"]ok thanks. also related to that question:

Does loading a library using the CI syntax:
$this->load->library('library_name')
create a new object?

Is that CI's way of creating an object like in regular php syntax, ie:
$myObject = new Email_Class();
?[/quote]

Yes, except the library then extends the current CI instance, and it is then accessed via
$this->library_name

Is there a reason why you can't pass whatever data you are needing from your controller to the view instead of getting data in the view from a library? If you can't directly pass it from your controller for some reason, call the library in the controller and then pass the data to the view. You shouldn't be accessing models or libraries or anything else (except helpers) in the view.


Messages In This Thread
Loading custom libraries - by El Forum - 10-12-2010, 08:50 PM
Loading custom libraries - by El Forum - 10-12-2010, 11:16 PM
Loading custom libraries - by El Forum - 10-12-2010, 11:31 PM
Loading custom libraries - by El Forum - 10-12-2010, 11:48 PM
Loading custom libraries - by El Forum - 10-12-2010, 11:58 PM
Loading custom libraries - by El Forum - 10-13-2010, 12:14 AM
Loading custom libraries - by El Forum - 10-13-2010, 12:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB