This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Validator/Mapping/Cache/CacheInterface.php

46 lines
1.0 KiB
PHP
Raw Normal View History

<?php
2010-10-02 11:42:31 +01:00
/*
* This file is part of the Symfony package.
2010-10-02 11:42:31 +01:00
*
* (c) Fabien Potencier <fabien@symfony.com>
2010-10-02 11:42:31 +01:00
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
2010-10-02 11:42:31 +01:00
*/
namespace Symfony\Component\Validator\Mapping\Cache;
use Symfony\Component\Validator\Mapping\ClassMetadata;
/**
* Persists ClassMetadata instances in a cache
*
2012-05-26 08:48:33 +01:00
* @author Bernhard Schussek <bschussek@gmail.com>
*/
interface CacheInterface
{
/**
* Returns whether metadata for the given class exists in the cache
*
* @param string $class
*/
2012-07-09 13:50:58 +01:00
public function has($class);
/**
* Returns the metadata for the given class from the cache
*
2010-10-15 22:49:09 +01:00
* @param string $class Class Name
*
* @return ClassMetadata|false A ClassMetadata instance or false on miss
*/
2012-07-09 13:50:58 +01:00
public function read($class);
/**
* Stores a class metadata in the cache
*
2010-10-15 22:49:09 +01:00
* @param ClassMetadata $metadata A Class Metadata
*/
2012-07-09 13:50:58 +01:00
public function write(ClassMetadata $metadata);
2011-06-08 11:16:48 +01:00
}