Example #1
0
 public function __construct($filename = '', $check = true)
 {
     if ($filename != '') {
         self::$filename = $filename;
         self::parse();
         // init the parser
         if ($check) {
             self::check();
             // check values.
         }
         self::$config = (array) self::array_to_object(self::$config);
         core::$config = (object) array_merge((array) core::$config, self::$config);
         // assign it to the core.
         self::$config = array();
         // unset self::$config, to avoid object <-> array errors
         // if the parser is used again.
     }
 }