Example #1
0
 /**
  * @return \Ace\Tokens\Store\StoreInterface
  */
 public function create()
 {
     // instantiate a different store depending on the value of $app['config']->getStoreDsn()
     $dsn = $this->config->getStoreDsn();
     $encryption = new Encryption($this->config->getEncryptionMethod(), $this->config->getEncryptionKey(), $this->config->getEncryptionIvSize());
     if ('MEMORY' == $dsn) {
         $store = new MemoryStore($encryption);
     } else {
         $store = new RedisStore($encryption, new Client($dsn));
     }
     return $store;
 }