[eluser]SniffTheGlove[/eluser]
New to CI and OOP
I have created a class library, the file is in the library directory and is loaded via the Controller construct.
One of the functions in the class returns an array but I am having trouble getting access to the array back in the controller to pass onto the view as a data variable.
For simplicity here this is my shortened function from my Class Library for example, there are many more variables to be returned in the array that I have not shown here.
function Get_Trans_TS() {
date_default_timezone_set('UTC');
$Trans_TS_Array = array();
$Trans_TS_Array['Timestamp_Now'] = gmmktime(gmdate("H"), gmdate("i"), gmdate("s"), gmdate("n"), gmdate("j"), gmdate("Y"));
$Trans_TS_Array['Timestamp_Full'] = gmdate('Y-m-d H:i

', $Trans_TS_Array['Timestamp_Now']);
$this->Trans_TS = $Trans_TS_Array;
}
Now I was hoping to access the array from a controller function by assigning the array but I can not find out how to do this and would like a little help.
I have tried
$data['Timestamp_Now'] = $this->TransClass->Get_Trans_TS['Timestamp_Now'];
$data['Timestamp_Full'] = $this->TransClass->Get_Trans_TS['Timestamp_Now'];
I keep getting the error...
Message: Trying to get property of non-object
Filename: controllers/controller_home.php
I have also tried
$data['Timestamp_Now'] = $this->TransClass->Trans_TS['Timestamp_Now'];
$data['Timestamp_Full'] = $this->TransClass->Trans_TS['Timestamp_Now'];
and
$data['Timestamp_Now'] = $this->TransClass->Trans_TS->Timestamp_Now;
$data['Timestamp_Full'] = $this->TransClass->Trans_TS->Timestamp_Now;
Thank you