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.

114 lines
3.3 KiB

12 years ago
  1. <?php
  2. /**
  3. * This file is a part of Quasi CMS
  4. *@package Quasi
  5. */
  6. if(!defined('QUASICMS') ) die('No Quasi.');
  7. if (!defined("CLASSNAME.CLASS.PHP")){
  8. define("CLASSNAME.CLASS.PHP",1);
  9. /**
  10. * Class ClassName
  11. *
  12. *@author Erik Winn <erikwinnmail@yahoo.com>
  13. *
  14. * $Id: CustomsInformation.php 357 2008-11-22 02:51:12Z erikwinn $
  15. *@version 0.1
  16. *
  17. *@copyright (C) 2008 by Erik Winn
  18. *@license GPL v.2
  19. This program is free software; you can redistribute it and/or modify
  20. it under the terms of the GNU General Public License as published by
  21. the Free Software Foundation; either version 2 of the License, or
  22. (at your option) any later version.
  23. This program is distributed in the hope that it will be useful,
  24. but WITHOUT ANY WARRANTY; without even the implied warranty of
  25. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26. GNU General Public License for more details.
  27. You should have received a copy of the GNU General Public License
  28. along with this program; if not, write to the Free Software
  29. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
  30. *
  31. *@package Quasi
  32. * @subpackage CMS
  33. */
  34. class ClassName /*extends QControl*/
  35. {
  36. /**
  37. *@var Member member object
  38. */
  39. protected $objMember;
  40. /**
  41. *@var string Errors
  42. */
  43. protected $strErrors;
  44. /**
  45. * ClassName Constructor
  46. *
  47. * @param string thing name ..
  48. */
  49. public function __construct($thing)
  50. {
  51. }
  52. public function __get($strName)
  53. {
  54. switch ($strName)
  55. {
  56. case 'Member':
  57. return $this->objMember ;
  58. case 'Errors':
  59. return $this->objErrors ;
  60. default:
  61. throw new QCallerException('Payment Action - Access Unknown property: ' . $strName);
  62. /* if subclass: try {
  63. return parent::__get($strName);
  64. } catch (QCallerException $objExc) {
  65. $objExc->IncrementOffset();
  66. throw $objExc;
  67. }*/
  68. }
  69. }
  70. public function __set($strName, $mixValue)
  71. {
  72. switch ($strName)
  73. {
  74. case 'Member':
  75. try {
  76. return ($this->objMember = QType::Cast($mixValue, 'Member' ));
  77. } catch (QInvalidCastException $objExc) {
  78. $objExc->IncrementOffset();
  79. throw $objExc;
  80. }
  81. case 'Errors':
  82. try {
  83. return ($this->strErrors .= "\n" . QType::Cast($mixValue, QType::String ));
  84. } catch (QInvalidCastException $objExc) {
  85. $objExc->IncrementOffset();
  86. throw $objExc;
  87. }
  88. default:
  89. throw new QCallerException('Payment Action - Set Unknown property: ' . $strName);
  90. /* try {
  91. return (parent::__set($strName, $mixValue));
  92. } catch (QCallerException $objExc) {
  93. $objExc->IncrementOffset();
  94. throw $objExc;
  95. }*/
  96. }
  97. }
  98. }//end class
  99. }//end define
  100. ?>