src/Model.php
public function delete()
    {
        if (method_exists($this, 'notify')) {
            $notify = clone $this;
        }
        if ($this instanceof Undeleteable) {
            throw new Exception\Undeleteable($this);
        }
        $errors = [];
        foreach ($this->__adapters as $adapter) {
            if ($error = $adapter->delete($this)) {
                $errors[] = $error;
            } else {
                $adapter->markDeleted();
            }
        }
        if (isset($notify)) {
            $notify->notify();
        }
        $this->__state = 'deleted';
        return $errors ? $errors : null;
    }
public function delete()
    {
        if (method_exists($this, 'notify')) {
            $notify = clone $this;
        }
        if ($this instanceof Undeleteable) {
            throw new Exception\Undeleteable($this);
        }
        $errors = [];
        foreach ($this->__adapters as $adapter) {
            if ($error = $adapter->delete($this)) {
                $errors[] = $error;
            } else {
                $adapter->markDeleted();
            }
        }
        if (isset($notify)) {
            $notify->notify();
        }
        $this->__state = 'deleted';
        return $errors ? $errors : null;
    }
public function delete ( ) { if ( method_exists ( $ this , 'notify' ) ) { $ notify = clone $ this ; } if ( $ this instanceof Undeleteable ) { throw new Exception \ Undeleteable ( $ this ) ; } $ errors = [ ] ; foreach ( $ this -> __adapters as $ adapter ) { if ( $ error = $ adapter -> delete ( $ this ) ) { $ errors [ ] = $ error ; } else { $ adapter -> markDeleted ( ) ; } } if ( isset ( $ notify ) ) { $ notify -> notify ( ) ; } $ this -> __state = 'deleted' ; return $ errors ? $ errors : null ; }
Deletes the current model from storage based on the specified adapters.
If an adapter supports transactions, you are encouraged to use them;
but you should do so in your own code.

@return null|array null on success, or an array of errors encountered.
@throw Ornament\Exception\Undeleteable if the model implements the
Undeleteable interface and is hence "protected".
Deletes the current model from storage based on the specified adapters . If an adapter supports transactions you are encouraged to use them ; but you should do so in your own code .