I am tring to translate my custom classes in a library for Codeigniter but I have this problem.
require_once "a.php";
require_once "b.php";
function __construct() {
$this->b = new b();
}
I changed the require and construct using the library loader.
function __construct() {
$this->CI =& get_instance();
$this->CI->load->library('a');
$this->CI->load->library('b');
}
but now I need to convert this function but I don't know in which mode a can do that
public function addRecipient($first,$second){
$a= new a($first); // ??? new library a ?
$a->header = 1;
$a->set($second);
$this->b->add($a); // passing object library a???
return $a;
}