Exemple #1
0
 /**
  * @return mixed
  */
 public function read()
 {
     if (!$this->isCached) {
         $this->cache->write($this->fileReader->read());
         $this->isCached = true;
     }
     return $this->cache->read();
 }
Exemple #2
0
 /**
  * @return mixed
  */
 public function getAll()
 {
     $result = $this->fileReader->read();
     if (is_null($result)) {
         return [];
     }
     if (is_scalar($result)) {
         return (array) $result;
     }
     return $result;
 }
Exemple #3
0
 /**
  * @return array|null
  */
 public function read()
 {
     return json_decode($this->fileReader->read(), true);
 }
 /**
  * @return array
  */
 public function read()
 {
     return $this->dataMapper->mapDataList((array) $this->fileReader->read());
 }