As you know, the distinction between singular and plural forms of
nouns is important in Cake naming convention. That is, model names
(class names and file names) are supposed to be singular, while table
names, controller names and view names are to be plural.

For example, we have LineItem and line_item.php in contrast to
LineItemsController and line_items_controller.php, and there does not
seem to be any problems because 'item' has a regular plural form of
'items.'

But how about the irregular forms of nouns? Like 'person' and
'people'? Don't we have Person and persons.php in contrast to
PeopleController and people_controller.php? From this singulra-plural
convention, I suspect that Cake itself has a rule or table (or a
dictionary) of singular nouns vs. plural nouns like the following, to
get the framework run.

person - people
item - items
potato - potatoes
knife - knives
fish - fish
woman - women
...

My question is how good or flexible the rules or the table are.

(1) Is 'PersonsController' instead of 'PeopleController' as a
controller class name intolerable to Cake when 'Person' is the model
class name?
(2) When 'Knife' is supplied as a model name, is Cake smart enough to
take 'KnivesController' and  rule out 'KnifesController'?

To make the long story short, what is the CakePHP's definition of
singular and plural nouns? How much should we count on it?


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

Reply via email to