IMP_Compose_Attachment_Storage::exists PHP Méthode

exists() abstract public méthode

Does the attachment exist in the storage backend?
abstract public exists ( ) : boolean
Résultat boolean True if the file exists.
    public abstract function exists();

Usage Example

Exemple #1
0
 /**
  * Send data to the browser.
  *
  * @throws IMP_Compose_Exception
  */
 public function sendData()
 {
     global $browser;
     if (!$this->_atc->exists()) {
         throw new IMP_Exception(_("The linked attachment does not exist. It may have been deleted by the original sender or it may have expired."));
     }
     $data = $this->_atc->read();
     $md = $this->_atc->getMetadata();
     $browser->downloadHeaders($md->filename, $md->type, false, $data->length());
     while (!$data->eof()) {
         echo $data->substring(0, 8192);
     }
     $data->close();
 }
All Usage Examples Of IMP_Compose_Attachment_Storage::exists