Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 793bdbd61c
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (19 sloc) 0.554 kb
<?php
class ConfigReader {
private static $_config;
public function __construct() {
if (!self::$_config) {
$this->_readConfig();
}
}
public function getAddonConfig($addonName) {
return self::$_config[$addonName];
}
private function _readConfig() {
$string = file_get_contents($_ENV['CRED_FILE'], false);
if ($string == false) {
die('FATAL: Could not read credentials file');
}
self::$_config = json_decode($string, true);
}
}
Jump to Line
Something went wrong with that request. Please try again.