Adapter
5 years ago
Schema
5 years ago
Adapter.php
5 years ago
AdapterInterface.php
5 years ago
BatchInsert.php
5 years ago
Schema.php
5 years ago
SchemaInterface.php
5 years ago
Settings.php
5 years ago
TransactionLevel.php
6 years ago
Settings.php
41 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Matomo - free/libre analytics platform |
| 4 | * |
| 5 | * @link https://matomo.org |
| 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later |
| 7 | * |
| 8 | */ |
| 9 | namespace Piwik\Db; |
| 10 | |
| 11 | use Piwik\Db; |
| 12 | |
| 13 | class Settings |
| 14 | { |
| 15 | public function getEngine() |
| 16 | { |
| 17 | return $this->getDbSetting('type'); |
| 18 | } |
| 19 | |
| 20 | public function getTablePrefix() |
| 21 | { |
| 22 | return $this->getDbSetting('tables_prefix'); |
| 23 | } |
| 24 | |
| 25 | public function getDbName() |
| 26 | { |
| 27 | return $this->getDbSetting('dbname'); |
| 28 | } |
| 29 | |
| 30 | public function getUsedCharset() |
| 31 | { |
| 32 | return strtolower($this->getDbSetting('charset')); |
| 33 | } |
| 34 | |
| 35 | private function getDbSetting($key) |
| 36 | { |
| 37 | $dbInfos = Db::getDatabaseConfig(); |
| 38 | return $dbInfos[$key]; |
| 39 | } |
| 40 | } |
| 41 |