Hey I have coded CakePHP for a number of things but never ran into this problem before surprisingly. Also I have thoroughly searched the net and CakePHP docs and have not found an answer to my question. My question is, I have a table for my model that should be named Class, obviously I cannot use that name though since it's a reserved PHP keyword. What options do I have to be able to refer to this model appropriately.
So far I have;
- Renamed my class model file to player_class.php
- Renamed my class model class to PlayerClass
- Changed var $name to 'PlayerClass'
- Added to my class model class; var $useTable = 'classes';
- Renamed my class controller to player_classes_controller.php
- Renamed my class controller class to PlayerClassesController
- Changed var $name to 'PlayerClasses'
While this does work, is this what has to be done or are to other options to be able to refer to it as Class still, like can I do any sort of mangling like _Class?
Thanks for the help everyone.
--Alex