Ejemplo n.º 1
0
 /**
  * Deletes an entity from the storage
  *
  * @param   object $entity The entity to delete
  *
  * @return  void
  *
  * @throws  OrmException  if the entity could not be deleted
  */
 public function delete($entity)
 {
     $persistor = new DoctrinePersistor($this->connection, $this->table, $this->entityRegistry->getEntityBuilder(), $this->entityRegistry);
     $persistor->delete($entity);
 }
 /**
  * Cast array to entity
  *
  * @param   array $matches The records
  *
  * @return  array
  */
 private function castToEntity($matches)
 {
     $entities = $this->entityRegistry->getEntityBuilder()->castToEntity($matches, $this->entityClass);
     return $entities;
 }
Ejemplo n.º 3
0
 /**
  * Deletes an entity from the storage
  *
  * @param   object $entity The entity to delete
  *
  * @return  void
  *
  * @throws  OrmException  if the entity could not be deleted
  */
 public function delete($entity)
 {
     $persistor = new CsvPersistor($this->gateway, $this->table, $this->entityRegistry->getEntityBuilder(), $this->entityRegistry);
     $persistor->delete($entity);
 }