Welcome Guest, Not a member yet? Register   Sign In
Accessing One Library From Within Another
#1

[eluser]SevenZark[/eluser]
I have one custom Library that needs to instantiate and access the features of another custom Library.

From what I read in the documentation I would think this should work, but instead I get the ever-vague 500 error (with nothing in the log output, even when the logging level is set to 4).

Here's basically how I'm going about it:

class LibraryB {

function foo()
{
$CI =& get_instance();
$CI->load->library('librarya'); // so far no problem
$CI->librarya->bar(); // adding this line causes CI to barf out a 500 with no other info
$this->librarya->bar(); // also tried this out of desperation, but still get the 500
}
}

Is this not how this is supposed to work? What am I missing here?
#2

[eluser]SevenZark[/eluser]
Nevermind, looks like something inside Library A is blowing up. The 500 error was throwing me off. Sure wish there were clearer error messages sometimes.




Theme © iAndrew 2016 - Forum software by © MyBB