Welcome Guest, Not a member yet? Register   Sign In
Introducing...REST!
#23

[eluser]noinput[/eluser]
Thank you very much for the contribution, it's working great for me and I just wanted to notate two simple mods I made to the library file and a few things I found out.

First, my rest service sits in a folder under controllers called "services", that way i can keep rest, post & xml-rpc all in one place. However i was having issues simply naming the class "rest" so i use it as "restful" and it works fine Wink Also since the class is being called one path location deeper i modified $i = 2 rather than $i = 1. This jumps the parse one folder deeper.

Lastly I noticed that the class would throw an error when trying to assign an empty index to the segmentArray. so I added the following conditional (also including my index bump from 1 -> 2 for the path issue):

Code:
//starting at line 18
        $i = 2;
         while($i < count($test))
        {
        
            if($test[$i] != ""){
                $array[strtolower($test[$i])] = strtolower($test[$i + 1]);
            }
            $i = $i + 2;
        }

Now this produces a cleaner error free set of arrays in the $this->rest object and everything works awesome.


Messages In This Thread
Introducing...REST! - by El Forum - 03-02-2008, 01:30 PM
Introducing...REST! - by El Forum - 03-09-2008, 12:42 AM
Introducing...REST! - by El Forum - 03-09-2008, 09:29 AM
Introducing...REST! - by El Forum - 03-11-2008, 11:00 AM
Introducing...REST! - by El Forum - 04-04-2008, 08:42 AM
Introducing...REST! - by El Forum - 04-04-2008, 08:32 PM
Introducing...REST! - by El Forum - 04-05-2008, 04:26 AM
Introducing...REST! - by El Forum - 04-05-2008, 05:48 AM
Introducing...REST! - by El Forum - 04-05-2008, 06:38 AM
Introducing...REST! - by El Forum - 04-05-2008, 09:55 AM
Introducing...REST! - by El Forum - 04-05-2008, 10:12 PM
Introducing...REST! - by El Forum - 04-06-2008, 03:46 AM
Introducing...REST! - by El Forum - 04-06-2008, 09:48 AM
Introducing...REST! - by El Forum - 04-06-2008, 09:48 AM
Introducing...REST! - by El Forum - 06-14-2008, 06:54 PM
Introducing...REST! - by El Forum - 06-14-2008, 07:09 PM
Introducing...REST! - by El Forum - 06-16-2008, 12:55 PM
Introducing...REST! - by El Forum - 06-18-2008, 09:34 AM
Introducing...REST! - by El Forum - 06-20-2008, 11:32 AM
Introducing...REST! - by El Forum - 06-23-2008, 04:59 PM
Introducing...REST! - by El Forum - 07-01-2008, 06:57 PM
Introducing...REST! - by El Forum - 07-01-2008, 07:51 PM
Introducing...REST! - by El Forum - 07-04-2008, 02:49 PM
Introducing...REST! - by El Forum - 07-04-2008, 04:00 PM
Introducing...REST! - by El Forum - 08-01-2008, 08:57 PM
Introducing...REST! - by El Forum - 10-02-2008, 06:42 PM
Introducing...REST! - by El Forum - 10-15-2008, 10:05 PM
Introducing...REST! - by El Forum - 10-21-2008, 07:17 PM
Introducing...REST! - by El Forum - 11-03-2008, 10:23 PM
Introducing...REST! - by El Forum - 05-24-2009, 04:41 AM
Introducing...REST! - by El Forum - 09-10-2009, 11:24 AM
Introducing...REST! - by El Forum - 03-24-2010, 11:51 AM
Introducing...REST! - by El Forum - 03-24-2010, 01:57 PM
Introducing...REST! - by El Forum - 03-24-2010, 02:18 PM
Introducing...REST! - by El Forum - 05-31-2010, 09:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB