Welcome Guest, Not a member yet? Register   Sign In
When loading a library in a library, how do you use the loaded library's functions?
#4

[eluser]CMCDragonkai[/eluser]
[quote author="InsiteFX" date="1295702007"]Did you try loading it in the Constructor?

Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Base_library{

// this should be private
private $CI;

public function __construct(){

if(!isset($this->CI)){
$this->CI =& get_instance();

$this->CI->load->library('test_library');
}

$this->test_library->lol();

}

}

InsiteFX[/quote]

That is what I did.

Quote:Why not just include the library and instantiate a new object?

This is what I ended up doing, it's just easier if all my classes had access to each other's functions.


Messages In This Thread
When loading a library in a library, how do you use the loaded library's functions? - by El Forum - 01-22-2011, 04:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB