Beispiel #1
0
 /**
  * @param \JsonSerializable $entity
  *
  * @return bool
  */
 public function remove(\JsonSerializable $entity)
 {
     $class = new \ReflectionClass($entity);
     if (!$entity->getId()) {
         return false;
     }
     $entityModel = $this->getEntities()[$class->getShortName()];
     $params = ['type' => $entityModel->type, 'index' => $entityModel->index, 'id' => $entity->getId()];
     $this->getClient()->delete($params);
 }