/** * @return int */ public function flush() { if ($this->hasChanged) { $this->hasChanged = false; return $this->fileReader->write($this->cache->read()); } return 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); }
/** * @param mixed $dataList * @return int */ public function set($dataList) { return $this->fileReader->write($dataList); }
/** * @param array $data * @param int $mode * @return int */ public function write($data, $mode = 0) { return $this->fileReader->write($this->dataMapper->unmapObjects((array) $data), $mode); }