Welcome Guest, Not a member yet? Register   Sign In
Using routes.php with Phil Sturgeon's REST_Controller
#1

[eluser]alexanderm[/eluser]
I have a working REST controller called api.php that extends Phil's.

I don't want every line of controller logic for my whole API in my api.php. I want people to hit:

www.me.com/api/<some_resource>
and
www.me.com/api/<some_unrelated_resource>

without having all the CRUD/etc. for some_resource and some_unrelated_resource in the same file.

I would end up with a file that's like 10,000 lines long. Yuck. I want the CRUD for some_resource to be self contained in a file so that I can easily copy it to create CRUD for some_other_resource.

I'm trying to use routes.php, but routes don't seem to work with Phil's framework. I got routes working for non-REST_Controller extension classes, so I'm confident I'm using them correctly.

What should I do?


Messages In This Thread
Using routes.php with Phil Sturgeon's REST_Controller - by El Forum - 06-30-2010, 01:46 PM
Using routes.php with Phil Sturgeon's REST_Controller - by El Forum - 07-22-2010, 11:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB