DomainObject.php 754 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /*
  3. * This file is part of the StateMachine package.
  4. *
  5. * (c) Alexandre Bacco
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. class DomainObject
  11. {
  12. private $stateA = 'checkout';
  13. private $stateB = 'checkout';
  14. public function getStateA()
  15. {
  16. return $this->stateA;
  17. }
  18. public function setStateA($state)
  19. {
  20. $this->stateA = $state;
  21. }
  22. public function getStateB()
  23. {
  24. return $this->stateB;
  25. }
  26. public function setStateB($state)
  27. {
  28. $this->stateB = $state;
  29. }
  30. public function setConfirmedNow()
  31. {
  32. var_dump('I (the object) am set confirmed at '.date('Y-m-d').'.');
  33. }
  34. }