PHP Class ManaPHP\Store\Adapter\Redis

Inheritance: extends ManaPHP\Component, implements ManaPHP\Store\AdapterInterface
Mostra file Open project: manaphp/manaphp

Protected Properties

Property Type Description
$_key string
$_service string

Public Methods

Method Description
__construct ( string | array | Redis $options = [] ) Redis constructor.
delete ( string $id ) Delete content
exists ( string $id ) : boolean Check if id exists
get ( string $id ) : string | false Fetch content
set ( string $id, string $value ) : void Caches content
setDependencyInjector ( ManaPHP\DiInterface $dependencyInjector ) : static

Method Details

__construct() public method

Redis constructor.
public __construct ( string | array | Redis $options = [] )
$options string | array | ConfManaPHP\Store\Adapter\Redis

delete() public method

Delete content
public delete ( string $id )
$id string

exists() public method

Check if id exists
public exists ( string $id ) : boolean
$id string
return boolean

get() public method

Fetch content
public get ( string $id ) : string | false
$id string
return string | false

set() public method

Caches content
public set ( string $id, string $value ) : void
$id string
$value string
return void

setDependencyInjector() public method

public setDependencyInjector ( ManaPHP\DiInterface $dependencyInjector ) : static
$dependencyInjector ManaPHP\DiInterface
return static

Property Details

$_key protected_oe property

protected string $_key
return string

$_service protected_oe property

protected string $_service
return string