1 | <?php |
||
14 | class Context |
||
15 | { |
||
16 | /** |
||
17 | * @var FactoryInterface |
||
18 | */ |
||
19 | protected $factory; |
||
20 | |||
21 | /** |
||
22 | * @param FactoryInterface $factory |
||
23 | */ |
||
24 | 60 | public function __construct(FactoryInterface $factory) |
|
28 | |||
29 | /** |
||
30 | * @param object $object |
||
31 | * @param string $graph |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | 10 | public function getState($object, $graph = 'default') |
|
39 | |||
40 | /** |
||
41 | * @param object $object |
||
42 | * @param string $graph |
||
43 | * @param bool $asObject |
||
44 | * |
||
45 | * @return array<string> |
||
46 | */ |
||
47 | 15 | public function getTransitions($object, $graph = 'default', $asObject = false) |
|
62 | |||
63 | /** |
||
64 | * @param object $object |
||
65 | * @param string $graph |
||
66 | * |
||
67 | * @return array<string> |
||
68 | */ |
||
69 | 10 | public function getProperties($object, $graph = 'default') |
|
73 | |||
74 | /** |
||
75 | * @param object $object |
||
76 | * @param string $property |
||
77 | * @param string $graph |
||
78 | * |
||
79 | * @return bool |
||
80 | */ |
||
81 | 10 | public function hasProperty($object, $property, $graph = 'default') |
|
85 | |||
86 | /** |
||
87 | * @param object $object |
||
88 | * @param string $graph |
||
89 | * |
||
90 | * @return StateMachine |
||
91 | */ |
||
92 | 60 | public function getStateMachine($object, $graph = 'default') |
|
96 | |||
97 | /** |
||
98 | * @return FactoryInterface |
||
99 | */ |
||
100 | 60 | public function getFactory() |
|
104 | } |
||
105 |