Interface ConnectionInterface
This interface defines the methods you can depend on in a connection.
Namespace: Cake\Datasource
Method Summary
-
config() public
Get the configuration data used to create the connection.
-
configName() public
Get the configuration name for this connection.
-
getCacher() public
Get a cacher.
-
getDriver() public
Gets the driver instance.
-
setCacher() public
Set a cacher.
Method Detail
config() ¶ public
config(): array<string, mixed>
Get the configuration data used to create the connection.
Returns
array<string, mixed>
configName() ¶ public
configName(): string
Get the configuration name for this connection.
Returns
string
getCacher() ¶ public
getCacher(): Psr\SimpleCache\CacheInterface
Get a cacher.
Returns
Psr\SimpleCache\CacheInterface
getDriver() ¶ public
getDriver(string $role = self::ROLE_WRITE): object
Gets the driver instance.
Parameters
-
string
$role optional
Returns
object
setCacher() ¶ public
setCacher(Psr\SimpleCache\CacheInterface $cacher): $this
Set a cacher.
Parameters
-
Psr\SimpleCache\CacheInterface
$cacher Cacher object
Returns
$this