Overview

Namespaces

  • Mothership
    • Exception
      • StateMachine
    • StateMachine

Classes

  • Mothership\StateMachine\StateMachineAbstract
  • Mothership\StateMachine\Status
  • Mothership\StateMachine\Transition
  • Mothership\StateMachine\WorkflowAbstract

Interfaces

  • Mothership\StateMachine\StateMachineInterface
  • Mothership\StateMachine\StatusInterface
  • Mothership\StateMachine\TransitionInterface
  • Mothership\StateMachine\WorkflowInterface

Exceptions

  • Mothership\Exception\ExceptionAbstract
  • Mothership\Exception\StateMachine\StateMachineAdapterException
  • Mothership\Exception\StateMachine\StateMachineException
  • Mothership\Exception\StateMachine\StatusException
  • Mothership\Exception\StateMachine\TransitionException
  • Mothership\Exception\StateMachine\WorkflowException
  • Overview
  • Namespace
  • Class
 1: <?php
 2: /**
 3:  * Magento
 4:  *
 5:  * NOTICE OF LICENSE
 6:  *
 7:  * This source file is subject to the Open Software License (OSL 3.0)
 8:  * that is bundled with this package in the file LICENSE.txt.
 9:  * It is also available through the world-wide-web at this URL:
10:  * http://opensource.org/licenses/osl-3.0.php
11:  * If you did not receive a copy of the license and are unable to
12:  * obtain it through the world-wide-web, please send an email
13:  * to license@magentocommerce.com so we can send you a copy immediately.
14:  *
15:  * DISCLAIMER
16:  *
17:  * Do not edit or add to this file if you wish to upgrade Magento to newer
18:  * versions in the future. If you wish to customize Magento for your
19:  * needs please refer to http://www.magentocommerce.com for more information.
20:  *
21:  * @category  Mothership
22:  * @package   Mothership_StateMachine
23:  * @author    Maurizio Brioschi <brioschi@mothership.de>
24:  * @copyright Copyright (c) 2015 Mothership GmbH
25:  * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
26:  * @link      http://www.mothership.de/
27:  */
28: 
29: 
30: namespace Mothership\StateMachine;
31: 
32: use Mothership\StateMachine\StatusInterface;
33: 
34: interface TransitionInterface
35: {
36:     public function __construct(StatusInterface $status, $transition_from);
37: 
38:     /**
39:      * Execute the transiction
40:      * @return mixed
41:      */
42:     public function process();
43: 
44:     /**
45:      * Get the starting point of the transiction
46:      * @return mixed
47:      */
48:     public function getTransitionFrom();
49: 
50:     /**
51:      * Is the name of the transiction  and the name of the new state a<nd also the method will be execute in the
52:      * workflow...
53:      * @return mixed
54:      */
55:     public function getName();
56: 
57:     /**
58:      * ending point of the transiction
59:      * @return mixed
60:      */
61:     public function getTransitionTo();
62: 
63:     /**
64:      * method that will be execute in the workflow
65:      * @return mixed
66:      */
67:     public function getMethodToRun();
68: 
69:     /**
70:      * If the transition has a condition to be executed
71:      * @return bool
72:      */
73:     public function hasCondition();
74: 
75:     /**
76:      * Get the condition to be executed
77:      * @return mixed
78:      */
79:     public function getCondition();
80: }
81: 
82: 
API documentation generated by ApiGen