Bravo3\Orm\Drivers\Filesystem\Io\IoDriverInterface::read PHP Method

read() public method

Read raw data from the interface, returning null if the file is not readable
public read ( string $key ) : string | null
$key string
return string | null
    public function read($key);

Usage Example

Example #1
0
 /**
  * Get the current value of an index
  *
  * @param string $key
  * @return array
  */
 protected function getJsonValue($key)
 {
     if ($this->io_driver->exists($key)) {
         return json_decode($this->io_driver->read($key), true);
     } else {
         return [];
     }
 }