Swift_EmbeddedFile::__construct PHP Method

__construct() public method

Details may be optionally provided to the constructor.
public __construct ( string | Swift_OutputByteStream $data = null, string $filename = null, string $contentType = null )
$data string | Swift_OutputByteStream
$filename string
$contentType string
    public function __construct($data = null, $filename = null, $contentType = null)
    {
        call_user_func_array(array($this, 'Swift_Mime_EmbeddedFile::__construct'), Swift_DependencyContainer::getInstance()->createDependenciesFor('mime.embeddedfile'));
        $this->setBody($data);
        $this->setFilename($filename);
        if ($contentType) {
            $this->setContentType($contentType);
        }
    }

Usage Example

Beispiel #1
0
 /**
  * Create a new EmbeddedFile.
  *
  * Details may be optionally provided to the constructor.
  *
  * @param string|Swift_OutputByteStream $data
  * @param string $filename
  * @param string $contentType
  */
 public function __construct($data = null, $filename = null, $contentType = null)
 {
     parent::__construct($data, $filename, $contentType);
 }
All Usage Examples Of Swift_EmbeddedFile::__construct