PHP code example of eoko / kes
1. Go to this page and download the library: Download eoko/kes 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/ */
eoko / kes example snippets
use Doctrine\Common\Annotations\AnnotationRegistry;
use Eoko\Kes\EntityCacheManager;
use Eoko\Kes\Plugins\DisabledPlugin\DisabledPlugin;
use Eoko\Kes\Plugins\MetadataPlugin\MetadataPlugin;
use Eoko\Kes\Plugins\UniqueIdPlugin\UniqueIdPlugin;
use JMS\Serializer\SerializerBuilder;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Cache\Adapter\TagAwareAdapter;
use Symfony\Component\EventDispatcher\EventDispatcher;
AnnotationRegistry::registerLoader('class_exists');
$eventDispatcher = new EventDispatcher();
$serializer = SerializerBuilder::create()->build();
$adapter = new TagAwareAdapter(new ArrayAdapter());
$manager = new EntityCacheManager($adapter);
// Register some useful plugins
$manager->registerPlugin(new MetadataPlugin());
$manager->registerPlugin(new UniqueIdPlugin());
$manager->registerPlugin(new DisabledPlugin());