1 | <?php |
||
25 | abstract class AbstractSeed implements SeedInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var \Phinx\Db\Adapter\AdapterInterface |
||
29 | */ |
||
30 | protected $adapter; |
||
31 | |||
32 | /** |
||
33 | * @var \Symfony\Component\Console\Input\InputInterface |
||
34 | */ |
||
35 | protected $input; |
||
36 | |||
37 | /** |
||
38 | * @var \Symfony\Component\Console\Output\OutputInterface |
||
39 | */ |
||
40 | protected $output; |
||
41 | |||
42 | /** |
||
43 | * Override to specify dependencies for dependency injection from the configured PSR-11 container |
||
44 | */ |
||
45 | public function __construct() |
||
48 | |||
49 | /** |
||
50 | * @inheritDoc |
||
51 | */ |
||
52 | public function run() |
||
55 | |||
56 | /** |
||
57 | * Return seeds dependencies. |
||
58 | * |
||
59 | * @return array |
||
60 | */ |
||
61 | public function getDependencies() |
||
65 | |||
66 | /** |
||
67 | * @inheritDoc |
||
68 | */ |
||
69 | 11 | public function setAdapter(AdapterInterface $adapter) |
|
75 | 11 | ||
76 | 11 | /** |
|
77 | * @inheritDoc |
||
78 | 11 | */ |
|
79 | 11 | public function getAdapter() |
|
83 | |||
84 | /** |
||
85 | * @inheritDoc |
||
86 | 11 | */ |
|
87 | public function setInput(InputInterface $input) |
||
88 | 11 | { |
|
89 | $this->input = $input; |
||
90 | |||
91 | return $this; |
||
92 | } |
||
93 | |||
94 | /** |
||
95 | * @inheritDoc |
||
96 | */ |
||
97 | public function getInput() |
||
98 | { |
||
99 | return $this->input; |
||
100 | } |
||
101 | |||
102 | /** |
||
103 | * @inheritDoc |
||
104 | */ |
||
105 | public function setOutput(OutputInterface $output) |
||
111 | |||
112 | /** |
||
113 | * @inheritDoc |
||
114 | */ |
||
115 | public function getOutput() |
||
119 | 11 | ||
120 | 11 | /** |
|
121 | * @inheritDoc |
||
122 | */ |
||
123 | public function getName() |
||
127 | |||
128 | 1 | /** |
|
129 | * @inheritDoc |
||
130 | */ |
||
131 | public function execute($sql) |
||
135 | |||
136 | 11 | /** |
|
137 | 11 | * @inheritDoc |
|
138 | */ |
||
139 | public function query($sql) |
||
143 | 1 | ||
144 | /** |
||
145 | 1 | * @inheritDoc |
|
146 | */ |
||
147 | public function fetchRow($sql) |
||
151 | 6 | ||
152 | /** |
||
153 | 6 | * @inheritDoc |
|
154 | */ |
||
155 | public function fetchAll($sql) |
||
159 | |||
160 | /** |
||
161 | * @inheritDoc |
||
162 | */ |
||
163 | public function insert($table, $data) |
||
168 | |||
169 | /** |
||
170 | * @param string $tableName Table name. |
||
171 | * |
||
172 | * @return bool |
||
173 | */ |
||
174 | public function hasData(string $tableName): bool |
||
182 | |||
183 | /** |
||
184 | * @inheritDoc |
||
185 | */ |
||
186 | public function hasTable($tableName) |
||
190 | |||
191 | /** |
||
192 | * @inheritDoc |
||
193 | */ |
||
194 | public function table($tableName, $options = []) |
||
198 | } |
||
199 |