1: <?php
2:
3: namespace Budabot\Core\Modules;
4:
5: use Budabot\Core\DB;
6:
7: /**
8: * Authors:
9: * - Tyrence (RK2)
10: *
11: * @Instance
12: */
13: class PlayerLookupController {
14:
15: /**
16: * Name of the module.
17: * Set automatically by module loader.
18: */
19: public $moduleName;
20:
21: /** @Inject */
22: public $db;
23:
24: /**
25: * @Setup
26: * This handler is called on bot startup.
27: */
28: public function setup() {
29: if ($this->db->getType() == DB::MYSQL) {
30: $this->db->loadSQLFile($this->moduleName, 'players_mysql');
31: } else if ($this->db->getType() == DB::SQLITE) {
32: $this->db->loadSQLFile($this->moduleName, 'players_sqlite');
33: }
34: }
35: }
36: