A QCodo powered CMS
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.

87 lines
3.0 KiB

  1. <?php
  2. /**
  3. * The OrderStatusType class defined here contains
  4. * code for the OrderStatusType enumerated type. It represents
  5. * the enumerated values found in the "order_status_type" table
  6. * in the database.
  7. *
  8. * To use, you should use the OrderStatusType subclass which
  9. * extends this OrderStatusTypeGen class.
  10. *
  11. * Because subsequent re-code generations will overwrite any changes to this
  12. * file, you should leave this file unaltered to prevent yourself from losing
  13. * any information or code changes. All customizations should be done by
  14. * overriding existing or implementing new methods, properties and variables
  15. * in the OrderStatusType class.
  16. *
  17. * @package Quinta CMS
  18. * @subpackage GeneratedDataObjects
  19. */
  20. abstract class OrderStatusTypeGen extends QBaseClass {
  21. const Shopping = 1;
  22. const Pending = 2;
  23. const Paid = 3;
  24. const Processing = 4;
  25. const Packaged = 5;
  26. const Shipped = 6;
  27. const Cancelled = 7;
  28. const Returned = 8;
  29. const Problem = 9;
  30. const MaxId = 9;
  31. public static $NameArray = array(
  32. 1 => 'Shopping',
  33. 2 => 'Pending',
  34. 3 => 'Paid',
  35. 4 => 'Processing',
  36. 5 => 'Packaged',
  37. 6 => 'Shipped',
  38. 7 => 'Cancelled',
  39. 8 => 'Returned',
  40. 9 => 'Problem');
  41. public static $TokenArray = array(
  42. 1 => 'Shopping',
  43. 2 => 'Pending',
  44. 3 => 'Paid',
  45. 4 => 'Processing',
  46. 5 => 'Packaged',
  47. 6 => 'Shipped',
  48. 7 => 'Cancelled',
  49. 8 => 'Returned',
  50. 9 => 'Problem');
  51. public static function ToString($intOrderStatusTypeId) {
  52. switch ($intOrderStatusTypeId) {
  53. case 1: return 'Shopping';
  54. case 2: return 'Pending';
  55. case 3: return 'Paid';
  56. case 4: return 'Processing';
  57. case 5: return 'Packaged';
  58. case 6: return 'Shipped';
  59. case 7: return 'Cancelled';
  60. case 8: return 'Returned';
  61. case 9: return 'Problem';
  62. default:
  63. throw new QCallerException(sprintf('Invalid intOrderStatusTypeId: %s', $intOrderStatusTypeId));
  64. }
  65. }
  66. public static function ToToken($intOrderStatusTypeId) {
  67. switch ($intOrderStatusTypeId) {
  68. case 1: return 'Shopping';
  69. case 2: return 'Pending';
  70. case 3: return 'Paid';
  71. case 4: return 'Processing';
  72. case 5: return 'Packaged';
  73. case 6: return 'Shipped';
  74. case 7: return 'Cancelled';
  75. case 8: return 'Returned';
  76. case 9: return 'Problem';
  77. default:
  78. throw new QCallerException(sprintf('Invalid intOrderStatusTypeId: %s', $intOrderStatusTypeId));
  79. }
  80. }
  81. }
  82. ?>