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.

77 lines
2.8 KiB

  1. <?php
  2. /**
  3. * The OrderItemStatusType class defined here contains
  4. * code for the OrderItemStatusType enumerated type. It represents
  5. * the enumerated values found in the "order_item_status_type" table
  6. * in the database.
  7. *
  8. * To use, you should use the OrderItemStatusType subclass which
  9. * extends this OrderItemStatusTypeGen 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 OrderItemStatusType class.
  16. *
  17. * @package Quinta CMS
  18. * @subpackage GeneratedDataObjects
  19. */
  20. abstract class OrderItemStatusTypeGen extends QBaseClass {
  21. const Ordered = 1;
  22. const Processing = 2;
  23. const BackOrdered = 3;
  24. const Shipped = 4;
  25. const Returned = 5;
  26. const Cancelled = 6;
  27. const Internal = 7;
  28. const MaxId = 7;
  29. public static $NameArray = array(
  30. 1 => 'Ordered',
  31. 2 => 'Processing',
  32. 3 => 'BackOrdered',
  33. 4 => 'Shipped',
  34. 5 => 'Returned',
  35. 6 => 'Cancelled',
  36. 7 => 'Internal');
  37. public static $TokenArray = array(
  38. 1 => 'Ordered',
  39. 2 => 'Processing',
  40. 3 => 'BackOrdered',
  41. 4 => 'Shipped',
  42. 5 => 'Returned',
  43. 6 => 'Cancelled',
  44. 7 => 'Internal');
  45. public static function ToString($intOrderItemStatusTypeId) {
  46. switch ($intOrderItemStatusTypeId) {
  47. case 1: return 'Ordered';
  48. case 2: return 'Processing';
  49. case 3: return 'BackOrdered';
  50. case 4: return 'Shipped';
  51. case 5: return 'Returned';
  52. case 6: return 'Cancelled';
  53. case 7: return 'Internal';
  54. default:
  55. throw new QCallerException(sprintf('Invalid intOrderItemStatusTypeId: %s', $intOrderItemStatusTypeId));
  56. }
  57. }
  58. public static function ToToken($intOrderItemStatusTypeId) {
  59. switch ($intOrderItemStatusTypeId) {
  60. case 1: return 'Ordered';
  61. case 2: return 'Processing';
  62. case 3: return 'BackOrdered';
  63. case 4: return 'Shipped';
  64. case 5: return 'Returned';
  65. case 6: return 'Cancelled';
  66. case 7: return 'Internal';
  67. default:
  68. throw new QCallerException(sprintf('Invalid intOrderItemStatusTypeId: %s', $intOrderItemStatusTypeId));
  69. }
  70. }
  71. }
  72. ?>