A Qcodo based CMS/ecommerce framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
732 B

13 years ago
  1. <?php
  2. require(__QCODO_CORE__ . '/codegen/QCodeGenBase.class.php');
  3. // Feel free to override any core QCodeGenBase methods here
  4. class QCodeGen extends QCodeGenBase {
  5. // Example: Overriding the Pluralize method
  6. protected function Pluralize($strName) {
  7. // Special Rules go Here
  8. switch (true) {
  9. case ($strName == 'person'):
  10. return 'people';
  11. case ($strName == 'Person'):
  12. return 'People';
  13. case ($strName == 'PERSON'):
  14. return 'PEOPLE';
  15. // Trying to be cute here...
  16. case (strtolower($strName) == 'fish'):
  17. return $strName . 'ies';
  18. // Otherwise, call parent
  19. default:
  20. return parent::Pluralize($strName);
  21. }
  22. }
  23. }
  24. require(__QCODO_CORE__ . '/codegen/library.inc.php');
  25. ?>