PHP Класс Neos\Cache\Backend\PdoBackend

Наследование: extends AbstractBackend, implements Neos\Cache\Backend\TaggableBackendInterface, implements IterableBackendInterface, implements Neos\Cache\Backend\PhpCapableBackendInterface, use trait RequireOnceFromValueTrait
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$cacheEntriesIterator ArrayIterator
$dataSourceName string
$databaseHandle PDO
$password string
$pdoDriver string
$username string

Открытые методы

Метод Описание
collectGarbage ( ) : void Does garbage collection
current ( ) : mixed Returns the data of the current cache entry pointed to by the cache entry iterator.
findIdentifiersByTag ( string $tag ) : array Finds and returns all cache entry identifiers which are tagged by the specified tag.
flush ( ) : void Removes all cache entries of this cache.
flushByTag ( string $tag ) : void Removes all cache entries of this cache which are tagged by the specified tag.
get ( string $entryIdentifier ) : mixed Loads data from the cache.
has ( string $entryIdentifier ) : boolean Checks if a cache entry with the specified identifier exists.
initializeObject ( ) : void Initialize the cache backend.
key ( ) : string Returns the identifier of the current cache entry pointed to by the cache entry iterator.
next ( ) : void Move forward to the next cache entry.
remove ( string $entryIdentifier ) : boolean Removes all cache entries matching the specified identifier.
rewind ( ) : void Rewinds the cache entry iterator to the first element and fetches cacheEntries.
set ( string $entryIdentifier, string $data, array $tags = [], integer $lifetime = null ) : void Saves data in the cache.
setDataSourceName ( string $DSN ) : void Sets the DSN to use
setPassword ( string $password ) : void Sets the password to use
setUsername ( string $username ) : void Sets the username to use
valid ( ) : boolean Checks if the current position of the cache entry iterator is valid.

Защищенные методы

Метод Описание
connect ( ) : void Connect to the database
createCacheTables ( ) : void Creates the tables needed for the cache backend.
getNotExpiredStatement ( ) : string Returns an SQL statement that evaluates to true if the entry is not expired.

Описание методов

collectGarbage() публичный Метод

Does garbage collection
public collectGarbage ( ) : void
Результат void

connect() защищенный Метод

Connect to the database
protected connect ( ) : void
Результат void

createCacheTables() защищенный Метод

Creates the tables needed for the cache backend.
protected createCacheTables ( ) : void
Результат void

current() публичный Метод

Returns the data of the current cache entry pointed to by the cache entry iterator.
public current ( ) : mixed
Результат mixed

findIdentifiersByTag() публичный Метод

Finds and returns all cache entry identifiers which are tagged by the specified tag.
public findIdentifiersByTag ( string $tag ) : array
$tag string The tag to search for
Результат array An array with identifiers of all matching entries. An empty array if no entries matched

flush() публичный Метод

Removes all cache entries of this cache.
public flush ( ) : void
Результат void

flushByTag() публичный Метод

Removes all cache entries of this cache which are tagged by the specified tag.
public flushByTag ( string $tag ) : void
$tag string The tag the entries must have
Результат void

get() публичный Метод

Loads data from the cache.
public get ( string $entryIdentifier ) : mixed
$entryIdentifier string An identifier which describes the cache entry to load
Результат mixed The cache entry's content as a string or FALSE if the cache entry could not be loaded

getNotExpiredStatement() защищенный Метод

Returns an SQL statement that evaluates to true if the entry is not expired.
protected getNotExpiredStatement ( ) : string
Результат string

has() публичный Метод

Checks if a cache entry with the specified identifier exists.
public has ( string $entryIdentifier ) : boolean
$entryIdentifier string An identifier specifying the cache entry
Результат boolean TRUE if such an entry exists, FALSE if not

initializeObject() публичный Метод

Initialize the cache backend.
public initializeObject ( ) : void
Результат void

key() публичный Метод

Returns the identifier of the current cache entry pointed to by the cache entry iterator.
public key ( ) : string
Результат string

next() публичный Метод

Move forward to the next cache entry.
public next ( ) : void
Результат void

remove() публичный Метод

Usually this only affects one entry but if - for what reason ever - old entries for the identifier still exist, they are removed as well.
public remove ( string $entryIdentifier ) : boolean
$entryIdentifier string Specifies the cache entry to remove
Результат boolean TRUE if (at least) an entry could be removed or FALSE if no entry was found

rewind() публичный Метод

Rewinds the cache entry iterator to the first element and fetches cacheEntries.
public rewind ( ) : void
Результат void

set() публичный Метод

Saves data in the cache.
public set ( string $entryIdentifier, string $data, array $tags = [], integer $lifetime = null ) : void
$entryIdentifier string An identifier for this specific cache entry
$data string The data to be stored
$tags array Tags to associate with this cache entry
$lifetime integer Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited liftime.
Результат void

setDataSourceName() публичный Метод

Sets the DSN to use
public setDataSourceName ( string $DSN ) : void
$DSN string The DSN to use for connecting to the DB
Результат void

setPassword() публичный Метод

Sets the password to use
public setPassword ( string $password ) : void
$password string The password to use for connecting to the DB
Результат void

setUsername() публичный Метод

Sets the username to use
public setUsername ( string $username ) : void
$username string The username to use for connecting to the DB
Результат void

valid() публичный Метод

Checks if the current position of the cache entry iterator is valid.
public valid ( ) : boolean
Результат boolean TRUE if the current position is valid, otherwise FALSE

Описание свойств

$cacheEntriesIterator защищенное свойство

protected ArrayIterator $cacheEntriesIterator
Результат ArrayIterator

$dataSourceName защищенное свойство

protected string $dataSourceName
Результат string

$databaseHandle защищенное свойство

protected PDO $databaseHandle
Результат PDO

$password защищенное свойство

protected string $password
Результат string

$pdoDriver защищенное свойство

protected string $pdoDriver
Результат string

$username защищенное свойство

protected string $username
Результат string