PHP Class Phalcon\Annotations\Adapter\Base

Base class for annotations adapters.
Inheritance: extends Phalcon\Annotations\Adapter
Show file Open project: phalcon/incubator Class Usage Examples

Protected Properties

Property Type Description
$defaultLifetime array Default option for cache lifetime.
$defaultPrefix string Default option for prefix.
$options array Backend's options.

Public Methods

Method Description
__construct ( null | array $options = null ) Class constructor.
read ( string $key ) : array
write ( string $key, array $data )

Protected Methods

Method Description
getCacheBackend ( ) : Phalcon\Cache\BackendInterface Returns cache backend instance.
prepareKey ( string $key ) : string Returns the key with a prefix or other changes

Method Details

__construct() public method

Class constructor.
public __construct ( null | array $options = null )
$options null | array

getCacheBackend() abstract protected method

Returns cache backend instance.
abstract protected getCacheBackend ( ) : Phalcon\Cache\BackendInterface
return Phalcon\Cache\BackendInterface

prepareKey() abstract protected method

Returns the key with a prefix or other changes
abstract protected prepareKey ( string $key ) : string
$key string
return string

read() public method

public read ( string $key ) : array
$key string
return array

write() public method

public write ( string $key, array $data )
$key string
$data array

Property Details

$defaultLifetime protected static property

Default option for cache lifetime.
protected static array $defaultLifetime
return array

$defaultPrefix protected static property

Default option for prefix.
protected static string $defaultPrefix
return string

$options protected property

Backend's options.
protected array $options
return array