Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\Validator\Mapping\Cache; Chris@0: Chris@0: use Symfony\Component\Validator\Mapping\ClassMetadata; Chris@0: Chris@0: /** Chris@0: * Persists ClassMetadata instances in a cache. Chris@0: * Chris@0: * @author Bernhard Schussek Chris@0: */ Chris@0: interface CacheInterface Chris@0: { Chris@0: /** Chris@0: * Returns whether metadata for the given class exists in the cache. Chris@0: * Chris@0: * @param string $class Chris@0: */ Chris@0: public function has($class); Chris@0: Chris@0: /** Chris@0: * Returns the metadata for the given class from the cache. Chris@0: * Chris@0: * @param string $class Class Name Chris@0: * Chris@0: * @return ClassMetadata|false A ClassMetadata instance or false on miss Chris@0: */ Chris@0: public function read($class); Chris@0: Chris@0: /** Chris@0: * Stores a class metadata in the cache. Chris@0: */ Chris@0: public function write(ClassMetadata $metadata); Chris@0: }