Welcome Guest, Not a member yet? Register   Sign In
Variable that points to a library class?

How can i do this so it works? I wan´t the $myservice variable to point to the loaded webservice.

if ($message=="a")
$myservice = $this->CI->webservice_a;
$myservice = $this->CI->webservice_b;

$data = $myservice->loadstuff();


You can assign your own property name when loading a class.

$this->load->library('webservice_a', NULL, 'myservice');

// Access it with:

Theme © iAndrew 2016 - Forum software by © MyBB