StateMachineInterface.php 1001 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /*
  3. * This file is part of the Sylius package.
  4. *
  5. * (c) Paweł Jędrzejewski
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Sylius\Component\Resource\StateMachine;
  11. use SM\StateMachine\StateMachineInterface as BaseStateMachineInterface;
  12. /**
  13. * Sylius State Machine
  14. *
  15. * @author Alexandre Bacco <alexandre.bacco@gmail.com>
  16. */
  17. interface StateMachineInterface extends BaseStateMachineInterface
  18. {
  19. /**
  20. * Returns the possible transition from given state
  21. * Returns null if no transition is possible
  22. *
  23. * @param string $fromState
  24. *
  25. * @return string|null
  26. */
  27. public function getTransitionFromState($fromState);
  28. /**
  29. * Returns the possible transition to the given state
  30. * Returns null if no transition is possible
  31. *
  32. * @param string $toState
  33. *
  34. * @return string|null
  35. */
  36. public function getTransitionToState($toState);
  37. }