示例#1
0
 /**
  * Initialize the ConfigPress
  * 
  * @param boolean $force
  * 
  * @return void
  * 
  * @access protected
  */
 protected function initialize($force = false)
 {
     if (is_null($this->config) || $force) {
         $config = $this->readOption();
         require_once __DIR__ . '/application/Reader.php';
         try {
             $reader = new Reader();
             $this->config = $reader->parseString($config);
             $this->error = null;
             //no errors, so clean any leftovers
         } catch (Exception $e) {
             $this->error = $e->getMessage();
             $this->config = array();
         }
     }
 }