getConfigValuesFromFiles() public method

コード例 #1
0
ファイル: ConfigReaderTest.php プロジェクト: diosmosis/piwik
    public function test_getConfigValuesFromFiles()
    {
        $fileConfig = $this->configReader->getConfigValuesFromFiles();
        $expected = array('Category' => array('key1' => array('value' => 'value_overwritten', 'description' => '', 'isCustomValue' => true, 'defaultValue' => 'value1'), 'key2' => array('value' => 'valueCommon', 'description' => '', 'isCustomValue' => false, 'defaultValue' => 'value2'), 'key3' => array('value' => '${@piwik(crash))}', 'description' => '', 'isCustomValue' => false, 'defaultValue' => NULL)), 'CategoryOnlyInGlobalFile' => array('key3' => array('value' => 'value3', 'description' => 'test comment', 'isCustomValue' => false, 'defaultValue' => 'value3'), 'key4' => array('value' => 'value4', 'description' => 'test comment 4', 'isCustomValue' => false, 'defaultValue' => 'value4')), 'TestArray' => array('installed' => array('value' => array(0 => 'plugin"1', 1 => 'plugin2', 2 => 'plugin3'), 'description' => 'test comment 2
with multiple lines', 'isCustomValue' => true, 'defaultValue' => array(0 => 'plugin1', 1 => 'plugin4'))), 'TestArrayOnlyInGlobalFile' => array('my_array' => array('value' => array(0 => 'value1', 1 => 'value2'), 'description' => '', 'isCustomValue' => false, 'defaultValue' => array(0 => 'value1', 1 => 'value2'))), 'GeneralSection' => array('password' => array('value' => '******', 'description' => '', 'isCustomValue' => true, 'defaultValue' => NULL), 'login' => array('value' => 'tes"t', 'description' => '', 'isCustomValue' => true, 'defaultValue' => NULL)), 'TestOnlyInCommon' => array('value' => array('value' => 'commonValue', 'description' => '', 'isCustomValue' => false, 'defaultValue' => NULL)), 'Tracker' => array('commonConfigTracker' => array('value' => 'commonConfigTrackerValue', 'description' => '', 'isCustomValue' => false, 'defaultValue' => NULL)));
        $this->assertEquals($expected, $fileConfig);
    }
コード例 #2
0
ファイル: Controller.php プロジェクト: diosmosis/piwik
 public function configfile()
 {
     Piwik::checkUserHasSuperUserAccess();
     $allSettings = Settings\Manager::getAllPluginSettings();
     $configValues = $this->configReader->getConfigValuesFromFiles();
     $configValues = $this->configReader->addConfigValuesFromPluginSettings($configValues, $allSettings);
     $configValues = $this->sortConfigValues($configValues);
     return $this->renderTemplate('configfile', array('allConfigValues' => $configValues));
 }
コード例 #3
0
ファイル: Controller.php プロジェクト: piwik/piwik
 public function configfile()
 {
     Piwik::checkUserHasSuperUserAccess();
     $settings = new SettingsProvider(\Piwik\Plugin\Manager::getInstance());
     $allSettings = $settings->getAllSystemSettings();
     $configValues = $this->configReader->getConfigValuesFromFiles();
     $configValues = $this->configReader->addConfigValuesFromSystemSettings($configValues, $allSettings);
     $configValues = $this->sortConfigValues($configValues);
     return $this->renderTemplate('configfile', array('allConfigValues' => $configValues));
 }