Welcome Guest, Not a member yet? Register   Sign In
[philsturgeon's REST Api] Can't access any models after REST library has been loaded. Workaround/fix?
#1

[eluser]DevTyme[/eluser]
Hey there, if anyone has used the REST api,
https://github.com/philsturgeon/codeigniter-restserver, then I'm sure you've needed some models to process whatever you were trying to do.

How did you get your access to your models?

After the initial
Code:
$this->load->library('REST')
I cannot get access to any of my models. I can successfully load them, but any function calls result in a
Code:
PHP Fatal error: Call to a member function model_fxn_name() on a non-object in
../controllers/my_api_controller.php

..And i would load and access them like i normally would:
Code:
$this->load->model('my_model');
$this->my_model->executeFunction();

Any ideas? Anyone with this similar problem have a work around?
I have tried loading the REST library within the specific function it's calling, then call another function with my models inside the second one.. but the REST library is still within the same scope and somehow doesn't let me get any calls through.

Hrmmmm


Messages In This Thread
[philsturgeon's REST Api] Can't access any models after REST library has been loaded. Workaround/fix? - by El Forum - 03-03-2011, 02:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB