1 | <?php |
||
16 | class DatabaseService |
||
17 | { |
||
18 | |||
19 | /** |
||
20 | * @var \Symfony\Component\Console\Output\OutputInterface |
||
21 | */ |
||
22 | protected $logger = null; |
||
23 | |||
24 | /** |
||
25 | * @var \Gerrie\Component\Database\Database |
||
26 | */ |
||
27 | protected $database = null; |
||
28 | |||
29 | /** |
||
30 | * Constructor |
||
31 | * |
||
32 | * @param Database $database |
||
33 | * @param OutputInterface $output |
||
34 | */ |
||
35 | public function __construct(Database $database, OutputInterface $output) |
||
40 | |||
41 | /** |
||
42 | * Creates the necessary database tables, if they are not exists. |
||
43 | * |
||
44 | * @return bool |
||
45 | * @throws \Exception |
||
46 | */ |
||
47 | public function setupDatabaseTables() |
||
84 | |||
85 | /** |
||
86 | * Returns the database object |
||
87 | * |
||
88 | * @return Database |
||
89 | */ |
||
90 | public function getDatabase() |
||
94 | |||
95 | /** |
||
96 | * Returns the logger object |
||
97 | * |
||
98 | * @return OutputInterface |
||
99 | */ |
||
100 | public function getLogger() |
||
104 | } |