1 | <?php |
||
15 | class Factory implements FactoryInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var ProcessDetectorInterface |
||
19 | */ |
||
20 | private $processDetector; |
||
21 | |||
22 | /** |
||
23 | * @var StateNameDetectorInterface |
||
24 | */ |
||
25 | private $stateNameDetector; |
||
26 | |||
27 | /** |
||
28 | * @var \SplObjectStorage|\SplObserver[] |
||
29 | */ |
||
30 | private $statemachineObserver; |
||
31 | |||
32 | /** |
||
33 | * @var TransitionSelectorInterface |
||
34 | */ |
||
35 | private $transitonSelector; |
||
36 | |||
37 | /** |
||
38 | * @var MutexFactoryInterface |
||
39 | */ |
||
40 | private $mutexFactory; |
||
41 | |||
42 | /** |
||
43 | * @param ProcessDetectorInterface $processDetector |
||
44 | * @param StateNameDetectorInterface $stateNameDetector |
||
45 | */ |
||
46 | 1 | public function __construct(ProcessDetectorInterface $processDetector, StateNameDetectorInterface $stateNameDetector = null) |
|
52 | |||
53 | /** |
||
54 | * @param MutexFactoryInterface $mutexFactory |
||
55 | */ |
||
56 | public function setMutexFactory($mutexFactory) |
||
60 | |||
61 | /** |
||
62 | * @param TransitionSelectorInterface $transitionSelector |
||
63 | */ |
||
64 | public function setTransitonSelector(TransitionSelectorInterface $transitionSelector) |
||
68 | |||
69 | /** |
||
70 | * @param \SplObserver $observer |
||
71 | */ |
||
72 | public function attachStatemachineObserver(\SplObserver $observer) |
||
76 | |||
77 | /** |
||
78 | * @param \SplObserver $observer |
||
79 | */ |
||
80 | public function detachStatemachineObserver(\SplObserver $observer) |
||
84 | |||
85 | /** |
||
86 | * @return \Traversable |
||
87 | */ |
||
88 | public function getStatemachineObserver() |
||
92 | |||
93 | /** |
||
94 | * @param object $subject |
||
95 | * |
||
96 | * @return \MetaborStd\Statemachine\StatemachineInterface |
||
97 | */ |
||
98 | 1 | public function createStatemachine($subject) |
|
120 | } |
||
121 |