Example #1
0
 function test_parse()
 {
     $str = "one = two\nthree = four";
     $this->assertEquals(array('one' => 'two', 'three' => 'four'), Ini::parse($str));
     $str = "[Section]\none = two\nthree = four";
     $this->assertEquals(array('Section' => array('one' => 'two', 'three' => 'four')), Ini::parse($str, true));
 }
Example #2
0
 public static function init($locale, $environment, $version)
 {
     $envFilename = Registry::get('applicationPath') . '/.env';
     if (file_exists($envFilename)) {
         $env = Ini::parse($envFilename, true, $locale . '-' . $environment . '-' . $version, 'common', false);
         $env = self::mergeEnvVariables($env);
     } else {
         $env = new \StdClass();
     }
     self::$data = Ini::bindArrayToObject($env);
 }
Example #3
0
 public static function init($locale, $environment, $version)
 {
     self::$data = new \StdClass();
     $config = Ini::parse(Registry::get('applicationPath') . '/configs/config.ini', true, $locale . '-' . $environment . '-' . $version, 'common', true);
     self::$data = $config;
 }
Example #4
0
<?php

require_once 'packages/sys/Ini.class.php';
$ini = new Ini('editplus.ini');
$ini->parse();
echo "<pre>";
print_r($ini->get());
echo "</pre>";
Example #5
0
 /**
  * Fills the $tables property with a list of the directories
  * in inc/conf/quicklinks.xml.
  * 
  * @access	public
  * 
  */
 function getDirs()
 {
     global $loader;
     $loader->import('saf.Misc.Ini');
     $links = Ini::parse('inc/conf/quicklinks.php');
     foreach ($links as $name => $link) {
         if ($name != 'all') {
             $this->tables[$name] = $link->display;
         }
     }
 }