f770f4615407760f3e3e5ac667a04dcf34981bf9
[yaffs-website] / vendor / symfony / validator / Mapping / Cache / CacheInterface.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\Validator\Mapping\Cache;
13
14 use Symfony\Component\Validator\Mapping\ClassMetadata;
15
16 /**
17  * Persists ClassMetadata instances in a cache.
18  *
19  * @author Bernhard Schussek <bschussek@gmail.com>
20  */
21 interface CacheInterface
22 {
23     /**
24      * Returns whether metadata for the given class exists in the cache.
25      *
26      * @param string $class
27      */
28     public function has($class);
29
30     /**
31      * Returns the metadata for the given class from the cache.
32      *
33      * @param string $class Class Name
34      *
35      * @return ClassMetadata|false A ClassMetadata instance or false on miss
36      */
37     public function read($class);
38
39     /**
40      * Stores a class metadata in the cache.
41      */
42     public function write(ClassMetadata $metadata);
43 }