function ValidatorBuilder::setMappingCache
Sets the cache for caching class metadata.
Return value
$this
File
-
vendor/
symfony/ validator/ ValidatorBuilder.php, line 234
Class
- ValidatorBuilder
- @author Bernhard Schussek <bschussek@gmail.com>
Namespace
Symfony\Component\ValidatorCode
public function setMappingCache(CacheItemPoolInterface $cache) : static {
if (null !== $this->metadataFactory) {
throw new ValidatorException('You cannot set a custom mapping cache after setting a custom metadata factory. Configure your metadata factory instead.');
}
$this->mappingCache = $cache;
return $this;
}