PHP code example of kozz / static-cache
1. Go to this page and download the library: Download kozz/static-cache library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kozz / static-cache example snippets
//SymfonyValidator.php
class SymfonyValidator implements CacheRepositoryInterface
{
public funcnction getSingleton()
{
return Validation::createValidatorBuilder()
->enableAnnotationMapping(new CachedReader(new AnnotationReader(), new ArrayCache()))
->setMetadataCache(new DoctrineCache(new ArrayCache()))
->getValidator();
}
}