1 | <?php |
||
17 | abstract class AbstractContextInitializer |
||
18 | implements |
||
|
|||
19 | FixtureInitializerInterface, |
||
20 | ImportFixtureEventListener, |
||
21 | PurgeFixtureEventListener |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * Данные контекста |
||
26 | * |
||
27 | * @var array|null |
||
28 | */ |
||
29 | protected $contextData; |
||
30 | |||
31 | /** |
||
32 | * {@inheritdoc} |
||
33 | */ |
||
34 | public function getSubscribedEvents() |
||
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | abstract public function purge(FixtureEvent $event); |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | abstract public function import(FixtureEvent $event); |
||
51 | |||
52 | /** |
||
53 | * Возвращает данные контекста |
||
54 | * |
||
55 | * @return array |
||
56 | * @throws \Nnx\DoctrineFixtureModule\FixtureInitializer\Exception\RuntimeException |
||
57 | */ |
||
58 | public function getContextData() |
||
66 | |||
67 | /** |
||
68 | * Устанавливает данные контекста |
||
69 | * |
||
70 | * @param array|null $contextData |
||
71 | * |
||
72 | * @return $this |
||
73 | */ |
||
74 | public function setContextData(array $contextData) |
||
80 | |||
81 | /** |
||
82 | * Возвращает значение параметра из контекста |
||
83 | * |
||
84 | * @param $name |
||
85 | * |
||
86 | * @return mixed |
||
87 | * @throws \Nnx\DoctrineFixtureModule\FixtureInitializer\Exception\RuntimeException |
||
88 | */ |
||
89 | public function getContextParam($name) |
||
99 | } |
||
100 |