Tuesday, July 27, 2010

REST connect to component function?

I am trying to gather some common functions in a component I am
calling "Lookup". This will house basic functions like
"LookupUserLastFirst" (to produce lists of users sorted by last name
and first name).

Part of my purpose in doing this is to make some of these functions
available on a read-only basis to our CMS via REST.

I am looking at the 1.3 documentation for REST including custom REST
routing:

http://book.cakephp.org/view/1240/Custom-REST-Routing

Is there a way to use custom routing to connect to functions in a
controller? All of the examples seem to point to "controller/
action". Do I need a stub controller that just includes the component
so I can do it that way, or is there a way to build a route like
"controller/component/function(action)" to call those directly?

Thanks,

Jim

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: