Fr3nch13/CakePHP Utilities

CachedCollection
in package
implements CollectionInterface

Decorates a schema collection and adds caching

Table of Contents

Interfaces

CollectionInterface
Represents a database schema collection

Properties

$cacher  : CacheInterface
Cacher instance.
$collection  : CollectionInterface
The decorated schema collection
$prefix  : string
The cache key prefix

Methods

__construct()  : mixed
Constructor.
cacheKey()  : string
Get the cache key for a given name.
describe()  : TableSchemaInterface
Get the column metadata for a table.
getCacher()  : CacheInterface
Get a cacher.
listTables()  : array<string|int, string>
Get the list of tables available in the current connection.
listTablesWithoutViews()  : array<string|int, mixed>
setCacher()  : $this
Set a cacher.

Properties

Methods

cacheKey()

Get the cache key for a given name.

public cacheKey(string $name) : string
Parameters
$name : string

The name to get a cache key for.

Return values
string

The cache key.

describe()

Get the column metadata for a table.

public describe(string $name[, array<string|int, mixed> $options = [] ]) : TableSchemaInterface
Parameters
$name : string

The name of the table to describe.

$options : array<string|int, mixed> = []

The options to use, see above.

Tags
inheritDoc
Return values
TableSchemaInterface

Object with column metadata.

listTables()

Get the list of tables available in the current connection.

public listTables() : array<string|int, string>
Tags
inheritDoc
Return values
array<string|int, string>

The list of tables in the connected database/schema.

listTablesWithoutViews()

public listTablesWithoutViews() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

        
On this page

Search results