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: namespace Mothership\StateMachine;
30: 
31: use Mothership\StateMachine\WorkflowInterface;
32: 
33: interface StatusInterface
34: {
35:     /**
36:      * Returns the state name
37:      *
38:      * @return string
39:      */
40:     public function getName();
41: 
42:     /**
43:      * Returns the state type
44:      *
45:      * @return string
46:      */
47:     public function getType();
48: 
49:     /**
50:      * Returns the available transitions
51:      *
52:      * @return array
53:      */
54:     public function getTransitions();
55: 
56:     /**
57:      * Check if a transiction can be run from this status
58:      * @param $transition_name
59:      * @param StatusInterface $status_from
60:      * @return mixed
61:      */
62:     public function execute($transition_name, StatusInterface $status_from);
63: 
64:     /**
65:      * @param string $property
66:      *
67:      * @return boolean
68:      */
69:     public function has($property);
70: 
71:     /**
72:      * @param string $property
73:      *
74:      * @return mixed
75:      */
76:     public function get($property);
77: 
78:     /**
79:      * Returns optional state properties
80:      *
81:      * @return mixed
82:      */
83:     public function getProperties();
84: 
85:     /**
86:      * @return WorkflowInterface
87:      */
88:     public function getWorkflow();
89: 
90:     /**
91:      * This is an internal status for the State, valid if the next step need a condition to be executed
92:      * @return mixed
93:      */
94:     public function setInternalStatus($state);
95: }
96: 
97: 
API documentation generated by ApiGen