IMP_Compose_Attachment_Storage::delete PHP Méthode

delete() abstract public méthode

Delete data from storage.
abstract public delete ( )
    public abstract function delete();

Usage Example

Exemple #1
0
 /**
  * Delete a linked attachment.
  *
  * @param string $token  The delete token.
  *
  * @return boolean|string  Filename of deleted file, or false if file was
  *                         not deleted.
  */
 public function delete($token)
 {
     if (empty($GLOBALS['conf']['compose']['link_attachments_notify']) || !($dtoken = $this->_getDeleteToken()) || $dtoken != $token) {
         return false;
     }
     $md = $this->_atc->getMetadata();
     try {
         $this->_atc->delete();
     } catch (Exception $e) {
     }
     $this->_atc->saveMetadata();
     return $md->filename;
 }
All Usage Examples Of IMP_Compose_Attachment_Storage::delete