PHP Interface Bravo3\Orm\Drivers\Filesystem\Io\IoDriverInterface

Show file Open project: bravo3/orm Interface Usage Examples

Public Methods

Method Description
delete ( string $key ) Delete a key
exists ( string $key ) : boolean Check if a key exists on the interface
read ( string $key ) : string | null Read raw data from the interface, returning null if the file is not readable
scan ( string $base, string $filter ) : string[] Get a list of keys on the interface
write ( string $key, string $data ) Write raw data to the interface

Method Details

delete() public method

Delete a key
public delete ( string $key )
$key string

exists() public method

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

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

scan() public method

Get a list of keys on the interface
public scan ( string $base, string $filter ) : string[]
$base string Base path to list all keys from
$filter string Key filter, @see docs/Queries.md - Wildcards
return string[]

write() public method

Write raw data to the interface
public write ( string $key, string $data )
$key string
$data string