Welcome Guest, Not a member yet? Register   Sign In

well, I have functions that do JSON decoding/encoding,
$this->rest->jsonEncode and $this->rest->jsonDecode, just pass a variable to jsonEncode to encode it into JSON, it can be an array or object. and to decode use jsonDecode

class Api extends Controller
function _test($data)
        echo $this->rest->jsonEncode($obj_to_encode_into_json);
function rest()
    $this->rest->addFunction('test', '_test', 'get');          
    $this->rest->addFunction('testpost', '__test', 'post');
    $this->rest->serve($this); //You have to pass a reference to the object that has the methods. In this example, it would be the controller. */

[quote author="Lovecannon" date="1207417120"]Hmm...Im gonna have to fix that..but Im going to have an update of my REST library soon, that will try and fix that error, and add some extra features.[/quote]

Hmm, I would test first if $_SERVER[PATH_INFO] is not set and then execute your code, that way you wont clobber it, but that is just me. Smile (new to PHP)


Yeah, I didnt think the ternary statement would break it if it wasnt already set, Ill have to take care of it.

And I just realized that statement wasnt even supposed to be in there, Ill have to remove it by next release

[quote author="Lovecannon" date="1204507823"]Download:


Does anyone have a copy of the zip file? Looks like the download location is bad.
Looking forward to trying it out! thanks.

Yeah, that site got taken down, Ill have to post a new link soon. My bad.

[quote author="Lovecannon" date="1213510197"]Yeah, that site got taken down, Ill have to post a new link soon. My bad.[/quote]

No prob, let me know if you need some webspace to host it, I can put it on my server for you. From the overview you posted the package looks awesome, can't wait to try it for the site I'm developing right now.


Would be interested to see this. I am implementing a full flickr API lib into our CI site, would like to us REST rather than xml-rpc.

Has this been put back up yet?

Here is a new link: http://www.mediafire.com/?t4g753ydmtp

Theme © iAndrew 2016 - Forum software by © MyBB