Esempio n. 1
0
 /**
  * @return int
  */
 public function flush()
 {
     if ($this->hasChanged) {
         $this->hasChanged = false;
         return $this->fileReader->write($this->cache->read());
     }
     return 0;
 }
Esempio n. 2
0
 /**
  * @param mixed $data
  * @param int $mode
  * @return int
  */
 public function write($data, $mode = 0)
 {
     return $this->fileReader->write(json_encode($data, $this->flags), $mode);
 }
Esempio n. 3
0
 /**
  * @param mixed $dataList
  * @return int
  */
 public function set($dataList)
 {
     return $this->fileReader->write($dataList);
 }
Esempio n. 4
0
 /**
  * @param array $data
  * @param int $mode
  * @return int
  */
 public function write($data, $mode = 0)
 {
     return $this->fileReader->write($this->dataMapper->unmapObjects((array) $data), $mode);
 }