[eluser]TerryT[/eluser]
I have a library where I call this in the constructor:
Code:
class Mypdf extends TCPDF
function __construct() {
parent::__construct();
$CI =& get_instance();
$CI->load->library('session');
$CI->load->library('pdf');
I also have these methods:
Code:
public function newpdf($title, $subject, $report_name)
public function body_project_listing()
To access sessions in either of the functions, I have to call:
Code:
$CI =& get_instance();
$CI->load->library('session');
$CI->load->library('pdf');
[/code]
in each function. Can anyone let me know why I can't just call it in the parent::__construct()? Thanks.