summaryrefslogtreecommitdiffstats
path: root/lib/private/app/platform.php
blob: 39f8a2979f9267cc3fd3e016378c6ebd64ff5329 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
 /**
 * @author Thomas Müller
 * @copyright 2014 Thomas Müller deepdiver@owncloud.com
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */

namespace OC\App;

use OCP\IConfig;

class Platform {

	function __construct(IConfig $config) {
		$this->config = $config;
	}

	public function getPhpVersion() {
		return phpversion();
	}

	public function getDatabase() {
		$dbType = $this->config->getSystemValue('dbtype', 'sqlite');
		if ($dbType === 'sqlite3') {
			$dbType = 'sqlite';
		}

		return $dbType;
	}
}