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

exists() public method

Check if a key exists on the interface
public exists ( string $key ) : boolean
$key string
return boolean
    public function exists($key);

Usage Example

 /**
  * 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 [];
     }
 }