XOOPS RMCommon Utilities
2.1.8.91RC
Main Page
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
EmbeddedFile.php
Go to the documentation of this file.
1
<?php
2
3
/*
4
* This file is part of SwiftMailer.
5
* (c) 2004-2009 Chris Corbyn
6
*
7
* For the full copyright and license information, please view the LICENSE
8
* file that was distributed with this source code.
9
*/
10
11
//@require 'Swift/Mime/Attachment.php';
12
//@require 'Swift/DependencyContainer.php';
13
//@require 'Swift/ByteStream/FileByteStream.php';
14
21
class
Swift_EmbeddedFile
extends
Swift_Mime_EmbeddedFile
22
{
23
31
public
function
__construct
(
$data
= null, $filename = null,
32
$contentType = null)
33
{
34
call_user_func_array(
35
array($this,
'Swift_Mime_EmbeddedFile::__construct'
),
36
Swift_DependencyContainer::getInstance
()
37
->createDependenciesFor(
'mime.embeddedfile'
)
38
);
39
40
$this->
setBody
(
$data
);
41
$this->
setFilename
($filename);
42
if
($contentType)
43
{
44
$this->
setContentType
($contentType);
45
}
46
}
47
55
public
static
function
newInstance
(
$data
= null, $filename = null,
56
$contentType = null)
57
{
58
return
new
self
(
$data
, $filename, $contentType);
59
}
60
66
public
static
function
fromPath
(
$path
)
67
{
68
return
self::newInstance()->setFile(
69
new
Swift_ByteStream_FileByteStream
(
$path
)
70
);
71
}
72
73
}
L:
XOOPS_Allure
SVN_XOOPS2
RMC
rmcommon
trunk
rmcommon
class
swift
classes
Swift
EmbeddedFile.php
Generated on Sun Mar 17 2013 20:41:06 for XOOPS RMCommon Utilities by
1.8.3.1