Swift_FileStream::getPath PHP Method

getPath() public method

Get the complete path to the file.
public getPath ( ) : string
return string
    public function getPath();

Usage Example

Beispiel #1
0
 /**
  * Set the file that this attachment is for.
  *
  * @param Swift_FileStream $file
  * @param string           $contentType optional
  *
  * @return Swift_Mime_Attachment
  */
 public function setFile(Swift_FileStream $file, $contentType = null)
 {
     $this->setFilename(basename($file->getPath()));
     $this->setBody($file, $contentType);
     if (!isset($contentType)) {
         $extension = strtolower(substr($file->getPath(), strrpos($file->getPath(), '.') + 1));
         if (array_key_exists($extension, $this->_mimeTypes)) {
             $this->setContentType($this->_mimeTypes[$extension]);
         }
     }
     return $this;
 }
All Usage Examples Of Swift_FileStream::getPath
Swift_FileStream