Kraken\Filesystem\FilesystemInterface::read PHP Method

read() public method

Read a file.
public read ( string $path ) : string
$path string
return string
    public function read($path);

Usage Example

コード例 #1
0
 /**
  * Copy data from persistent storage to temporary one.
  *
  * @return mixed
  * @throws ReadException
  */
 private function selectFromStorage()
 {
     if (!$this->fs->exists($this->fsPath)) {
         return $this->getEmptyStorage();
     }
     $data = json_decode($this->fs->read($this->fsPath), true);
     if (!isset($data['pid']) || !$this->system->existsPid($data['pid'])) {
         return $this->getEmptyStorage();
     }
     return $data;
 }
All Usage Examples Of Kraken\Filesystem\FilesystemInterface::read