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/Components/Validator/Mapping/Cache/CacheInterface.php

36 lines
773 B
PHP
Raw Normal View History

<?php
namespace Symfony\Components\Validator\Mapping\Cache;
use Symfony\Components\Validator\Mapping\ClassMetadata;
/**
* Persists ClassMetadata instances in a cache
*
* @author Bernhard Schussek <bernhard.schussek@symfony-project.com>
*/
interface CacheInterface
{
/**
* Returns whether metadata for the given class exists in the cache
*
* @param string $class
*/
public function has($class);
/**
* Returns the metadata for the given class from the cache
*
* @param string $class
* @return ClassMetadata
*/
public function read($class);
/**
* Stores a class metadata in the cache
*
* @param $class
* @param $metadata
*/
public function write(ClassMetadata $metadata);
}