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 | * @param \Symfony\Component\Console\Input\InputInterface|null $input |
||
44 | * @param \Symfony\Component\Console\Output\OutputInterface|null $output |
||
45 | */ |
||
46 | final public function __construct(InputInterface $input = null, OutputInterface $output = null) |
||
55 | |||
56 | /** |
||
57 | * @inheritDoc |
||
58 | */ |
||
59 | public function run() |
||
62 | |||
63 | /** |
||
64 | * Return seeds dependencies. |
||
65 | * |
||
66 | * @return array |
||
67 | */ |
||
68 | public function getDependencies() |
||
72 | 11 | ||
73 | 11 | /** |
|
74 | 11 | * @inheritDoc |
|
75 | 11 | */ |
|
76 | 11 | public function setAdapter(AdapterInterface $adapter) |
|
82 | |||
83 | /** |
||
84 | * @inheritDoc |
||
85 | */ |
||
86 | 11 | public function getAdapter() |
|
90 | |||
91 | /** |
||
92 | * @inheritDoc |
||
93 | */ |
||
94 | public function setInput(InputInterface $input) |
||
95 | { |
||
96 | $this->input = $input; |
||
97 | |||
98 | return $this; |
||
99 | } |
||
100 | |||
101 | /** |
||
102 | * @inheritDoc |
||
103 | */ |
||
104 | public function getInput() |
||
105 | { |
||
106 | return $this->input; |
||
107 | } |
||
108 | |||
109 | /** |
||
110 | * @inheritDoc |
||
111 | */ |
||
112 | public function setOutput(OutputInterface $output) |
||
118 | |||
119 | 11 | /** |
|
120 | 11 | * @inheritDoc |
|
121 | */ |
||
122 | public function getOutput() |
||
126 | 1 | ||
127 | /** |
||
128 | 1 | * @inheritDoc |
|
129 | */ |
||
130 | public function getName() |
||
134 | 11 | ||
135 | /** |
||
136 | 11 | * @inheritDoc |
|
137 | 11 | */ |
|
138 | public function execute($sql) |
||
142 | |||
143 | 1 | /** |
|
144 | * @inheritDoc |
||
145 | 1 | */ |
|
146 | public function query($sql) |
||
150 | |||
151 | 6 | /** |
|
152 | * @inheritDoc |
||
153 | 6 | */ |
|
154 | public function fetchRow($sql) |
||
158 | |||
159 | /** |
||
160 | * @inheritDoc |
||
161 | */ |
||
162 | public function fetchAll($sql) |
||
166 | |||
167 | /** |
||
168 | * @inheritDoc |
||
169 | */ |
||
170 | public function insert($table, $data) |
||
178 | |||
179 | /** |
||
180 | * @inheritDoc |
||
181 | */ |
||
182 | public function hasTable($tableName) |
||
186 | |||
187 | /** |
||
188 | * @inheritDoc |
||
189 | */ |
||
190 | public function table($tableName, $options = []) |
||
194 | } |
||
195 |