W3cubDocs

/Symfony 2.8

Symfony\Component\Validator\Mapping\Cache\DoctrineCache

class DoctrineCache implements CacheInterface

Adapts a Doctrine cache to a CacheInterface.

Methods

__construct(Cache $cache)

Creates a new Doctrine cache.

setCache(Cache $cache)

Sets the cache to adapt.

has(string $class)

Returns whether metadata for the given class exists in the cache

ClassMetadata|false read(string $class)

Returns the metadata for the given class from the cache

write(ClassMetadata $metadata)

Stores a class metadata in the cache

Details

public __construct(Cache $cache)

Creates a new Doctrine cache.

Parameters

Cache $cache The cache to adapt

public setCache(Cache $cache)

Sets the cache to adapt.

Parameters

Cache $cache The cache to adapt

public has(string $class)

Returns whether metadata for the given class exists in the cache

Parameters

string $class

public ClassMetadata|false read(string $class)

Returns the metadata for the given class from the cache

Parameters

string $class Class Name

Return Value

ClassMetadata|false A ClassMetadata instance or false on miss

public write(ClassMetadata $metadata)

Stores a class metadata in the cache

Parameters

ClassMetadata $metadata A Class Metadata

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.8/Symfony/Component/Validator/Mapping/Cache/DoctrineCache.html