public function delete()
    {
        $mapper = Pheasant::instance()->mapperFor($this);

        $this->events()->wrap(array('Delete'), $this, function($obj) use ($mapper) {
            $mapper->delete($obj);

            // ensure we clear the changes before after events fire
            $obj->markSaved(false)->clearChanges();
        });

        return $this;
    }
public function delete()
    {
        $mapper = Pheasant::instance()->mapperFor($this);

        $this->events()->wrap(array('Delete'), $this, function($obj) use ($mapper) {
            $mapper->delete($obj);

            // ensure we clear the changes before after events fire
            $obj->markSaved(false)->clearChanges();
        });

        return $this;
    }
public function delete ( ) { $ mapper = Pheasant :: instance ( ) -> mapperFor ( $ this ) ; $ this -> events ( ) -> wrap ( array ( 'Delete' ) , $ this , function ( $ obj ) use ( $ mapper ) { $ mapper -> delete ( $ obj ) ; // ensure we clear the changes before after events fire $ obj -> markSaved ( false ) -> clearChanges ( ) ; } ) ; return $ this ; }
Deletes the domain object via the associated mapper
@chainable
Deletes the domain object via the associated mapper