trash() public method

This function will remove the specified OODBBean Bean Object from the database.
public trash ( redbeanphp\OODBBean | redbeanphp\SimpleModel $bean ) : void
$bean redbeanphp\OODBBean | redbeanphp\SimpleModel bean you want to remove from database
return void
示例#1
0
 /**
  * Removes a bean from the database.
  * This function will remove the specified OODBBean
  * Bean Object from the database.
  *
  * @param OODBBean|SimpleModel $bean bean you want to remove from database
  *
  * @return void
  */
 public function trash($bean)
 {
     $bean = $this->unboxIfNeeded($bean);
     return $this->repository->trash($bean);
 }