Esempio n. 1
0
 /**
  * {@inheritDoc}
  */
 public function load($group, $environment = '')
 {
     $data = [];
     if (!$this->loaded) {
         $this->loaded = true;
         $data = (array) Reader::readFile($this->cache_file, 'serialized');
     }
     return $data;
 }
Esempio n. 2
0
 /**
  * {@inheritDoc}
  */
 public function load($group, $environment = '')
 {
     $data = [];
     $env = $environment ?: $this->environment;
     foreach ($this->globFiles($group, $env) as $file) {
         $grp = basename($file, '.' . $this->file_type);
         if (!isset($data[$grp])) {
             $data[$grp] = [];
         }
         $data[$grp] = array_replace_recursive($data[$grp], (array) Reader::readFile($file));
     }
     return $data;
 }