Exemplo n.º 1
0
 /**
  * @param KeyValue $keyValue
  */
 public function create(KeyValue $keyValue)
 {
     $existentkeyValue = $this->findElementWithNoException($keyValue->getKey(), $keyValue->getNamespace());
     if ($existentkeyValue) {
         $existentkeyValue->setValues($keyValue->getKey(), $keyValue->getValue(), $keyValue->getNamespace(), $keyValue->getExpirationTimestamp());
     } else {
         $this->dm->persist($keyValue);
     }
     $this->flush();
 }