/** * Sets the configuration for the driver * * @param mixed $conf */ public function setConfiguration($conf) { parent::setConfiguration($conf); $this->cacheDir = $this->container->getParameter('kernel.cache_dir') . '/oneacademy/'; if (!file_exists($this->cacheDir)) { mkdir($this->cacheDir, 0777, true); } }
/** * Sets the configuration for the driver * * @param mixed $conf */ public function setConfiguration($conf) { if (empty($conf['container']) || empty($conf['memcache'])) { throw new InvalidParameterException(); } parent::setConfiguration($conf['container']); if (!$conf['memcache'] instanceof \Memcache) { throw new InvalidParameterException(); } $this->memcache = $conf['memcache']; }