Exemplo n.º 1
0
 /**
  * Removes a row from the rowset
  *
  * The row will be removed based on it's identity_column if set or otherwise by it's object handle.
  *
  * @param  DatabaseRowInterface $row
  * @throws \InvalidArgumentException if the object doesn't implement DatabaseRowInterface
  * @return DatabaseRowsetAbstract
  */
 public function remove($row)
 {
     if (!$row instanceof DatabaseRowInterface) {
         throw new \InvalidArgumentException('Row needs to implement DatabaseRowInterface');
     }
     return $this->__rowset->remove($row);
 }
Exemplo n.º 2
0
 /**
  * Removes an entity from the collection
  *
  * The entity will be removed based on it's identity_key if set or otherwise by it's object handle.
  *
  * @param  ModelEntityInterface $entity
  * @throws \InvalidArgumentException if the object doesn't implement ModelEntityInterface
  * @return ModelEntityComposite
  */
 public function remove($entity)
 {
     if (!$entity instanceof ModelEntityInterface) {
         throw new \InvalidArgumentException('Entity needs to implement ModelEntityInterface');
     }
     return $this->__entities->remove($entity);
 }