コード例 #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  KObjectHandlable|KDatabaseRowInterface $row
  * @throws \InvalidArgumentException if the object doesn't implement KDatabaseRowInterface
  * @return KDatabaseRowsetAbstract
  */
 public function remove(KObjectHandlable $row)
 {
     if (!$row instanceof KDatabaseRowInterface) {
         throw new InvalidArgumentException('Row needs to implement KDatabaseRowInterface');
     }
     return parent::remove($row);
 }
コード例 #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  KObjectHandlable|KModelEntityInterface $entity
  * @throws InvalidArgumentException if the object doesn't implement KModelEntityInterface
  * @return KModelEntityComposite
  */
 public function remove(KObjectHandlable $entity)
 {
     if (!$entity instanceof KModelEntityInterface) {
         throw new InvalidArgumentException('Entity needs to implement KModelEntityInterface');
     }
     return parent::remove($entity);
 }