示例#1
0
 /**
  * @param $file
  * @return array
  */
 protected function parseFile($file)
 {
     $parser = new Parser();
     $contents = $this->filesystem->readFile($file);
     $data = $parser->parse($contents);
     return $data;
 }
示例#2
0
 /**
  * @return array
  */
 public function getConfigurations()
 {
     if ($this->configuration !== null) {
         return $this->configuration;
     }
     $cacheFilePath = sprintf('%s/%s', $this->kernel->getCacheDir(), self::CACHE_FILE_NAME);
     $configuration = json_decode($this->filesystem->readFile($cacheFilePath), true);
     $this->configuration = $configuration;
     return $configuration;
 }
示例#3
0
 protected function getSettingArrayFromCache()
 {
     $cacheFilePath = sprintf('%s/%s', $this->kernel->getCacheDir(), self::CACHE_FILE_NAME);
     $settingArray = json_decode($this->fileSystem->readFile($cacheFilePath), $assoc = true);
     return array_filter($settingArray);
 }