Esempio n. 1
0
 /**
  * Gets the compiler configuration file
  * 
  * @return array
  */
 public function getConfig()
 {
     $parser = new YamlParser();
     if (!$parser instanceof YamlParser) {
         throw new Exception\ConfigException("Xlix Yaml Extension is necessary for parsing the configuration");
     }
     return $parser->parseXlixRelativeConfig($this->file);
 }
Esempio n. 2
0
 public function isApi()
 {
     $request = Request::createFromGlobals();
     $cfg = new YamlParser();
     $api = $cfg->parseXlixConfig()->api;
     $headers = $request->headers;
     if ($headers->get($api['header_key']) && $headers->get($api['header_secret'])) {
     }
 }
Esempio n. 3
0
 public function parseValue($const)
 {
     $parser = new YamlParser();
     if (is_object($this->file)) {
         $cons = $this->file;
     } else {
         $cons = (object) $parser->parseConfig(dirname(__FILE__) . '/log.yml');
         $this->file = $cons;
     }
     return $cons->translation[$const];
 }
Esempio n. 4
0
 public function getYamlConfig($file)
 {
     $yamlparser = new YamlParser();
     if (file_exists($file)) {
         return $yamlparser->parseFile($file);
     }
     return null;
 }
Esempio n. 5
0
 public function __construct()
 {
     $yaml = new YamlParser();
     $this->pluginNamespace = $yaml->parseXlixConfig()->plugins['namespace'];
 }
Esempio n. 6
0
 public function jqueryui()
 {
     $parser = new YamlParser();
     return $parser->parseXlixConfig()->global['twig']['jqueryui'];
 }
Esempio n. 7
0
 public function getPluginConfig($plugin)
 {
     $class = $this->loadPlugin($plugin);
     $parser = new YamlParser();
     return $parser->parseConfig($class->getConfigLocation());
 }