I've got a console task I've started that does some of this, I
originally built it to figure out what cake was doing with a specific
multi word table I had.
But this is a great idea I'll work on my implementation a bit more and
then post it to github with a follow up post to this thread.
I think a console task over a web service will be cleaner because I
will want to use my specific apps inflections.php file which has some
additional rules like geese -> goose etc. as well as to be able to see
the real full paths for my app in the right format for linux or
windows. Really to be relative to my apps specific environment.

some example uses might be:
cake inflect table people
cake inflect class person
cake inflect controller
cake inflect action
cake inflect url controller/action/param

cake inflect table people
which would output all of the inflection info you should be using:
Table: people
fk: person_id
ModelClass Person
ModelPath /home/myfolder/myapp/models/person.php
ControllerClass PeopleController
ControllerPath /home/myfolder/myapp/controllers/people_controller.php
etc.

The ones I always get stuck on are the double words like:
contact_events or contacts_events or contacts_event

I've verified that it is possible to identify if a word is singular or
plural and then maybe from that build out the rest If i can accomplish
this then the command would be cake inflect people
So cake inflect people would identify it as plural and build out all
the output based on that.
cake inflect person should then output the exact same info as cake
inflect people with the model always equal to Person, table = people
etc.

We use inflection for models(Class, File, Table), controllers(Class,
File, actionNames), views(Path, File) Any others that might be worth
adding to this util let me know.

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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to