public function __construct(array $options = array(), $context = null, LoggerInterface $logger = null) { parent::__construct($options, $context, $logger); }
/** * Class constructor. * * @param array $options Initial options for the cache adapter: * - em \Doctrine\ORM\EntityManager Optional, an already defined EntityManager (simply returns it) * - dbal array Optional, an array of Doctrine connection options among: * - connection \Doctrine\DBAL\Connection Optional, an already initialized database connection * - proxy_dir string The proxy directory * - proxy_ns string The namespace for Doctrine proxy * - charset string Optional, the charset to use * - collation string Optional, the collation to use * - ... mixed All the required parameter to open a new connection * @param string $context An optional cache context * @param \Psr\Log\LoggerInterface $logger An optional logger * * @throws \BackBee\Cache\Exception\CacheException Occurs if the entity manager for this cache adaptor cannot be created */ public function __construct(array $options = array(), $context = null, LoggerInterface $logger = null) { parent::__construct($options, $context, $logger); $this->setEntityManager(); $this->setEntityRepository(); $this->setPrefixKey(); }
/** * Class constructor. * * @param array $options Initial options for the cache adapter: none to be defined * @param string $context An optional cache context * @param \Psr\Log\LoggerInterface $logger An optional logger * * @throws \BackBee\Cache\Exception\CacheException Occurs if the entity manager for this cache adaptor cannot be created */ public function __construct(array $options = array(), $context = null, LoggerInterface $logger = null) { if (false === extension_loaded('apc')) { throw new CacheException('APC extension not loaded'); } parent::__construct($options, $context, $logger); $this->_hashmapId = self::HASHMAP_PREFIX . '_' . md5($this->getContext()); $this->_hashmap = $this->loadHashmap(); }