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.

82 lines
2.8 KiB

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