예제 #1
0
 /**
  * @return mixed
  */
 public function read()
 {
     if (!$this->isCached) {
         $this->cache->write($this->fileReader->read());
         $this->isCached = true;
     }
     return $this->cache->read();
 }
예제 #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;
 }
예제 #3
0
파일: Json.php 프로젝트: raphhh/balloon
 /**
  * @return array|null
  */
 public function read()
 {
     return json_decode($this->fileReader->read(), true);
 }
예제 #4
0
 /**
  * @return array
  */
 public function read()
 {
     return $this->dataMapper->mapDataList((array) $this->fileReader->read());
 }