Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
zendframework1
library
Zend
Mail
Message.php
Go to the documentation of this file.
1
<?php
26
#require_once 'Zend/Mail/Part.php';
27
31
#require_once 'Zend/Mail/Message/Interface.php';
32
39
class
Zend_Mail_Message
extends
Zend_Mail_Part
implements
Zend_Mail_Message_Interface
40
{
45
protected
$_flags
= array();
46
57
public
function
__construct
(array
$params
)
58
{
59
if
(isset(
$params
[
'file'
])) {
60
if
(!
is_resource
(
$params
[
'file'
])) {
61
$params
[
'raw'
] = @
file_get_contents
(
$params
[
'file'
]);
62
if
(
$params
[
'raw'
] ===
false
) {
66
#require_once 'Zend/Mail/Exception.php';
67
throw
new
Zend_Mail_Exception
(
'could not open file'
);
68
}
69
}
else
{
70
$params
[
'raw'
] = stream_get_contents(
$params
[
'file'
]);
71
}
72
$params
[
'raw'
] = preg_replace(
"/(?<!\r)\n/"
,
"\r\n"
,
$params
[
'raw'
]);
73
}
74
75
if
(!empty(
$params
[
'flags'
])) {
76
// set key and value to the same value for easy lookup
77
$this->_flags = array_merge($this->_flags, array_combine(
$params
[
'flags'
],
$params
[
'flags'
]));
78
}
79
80
parent::__construct(
$params
);
81
}
82
88
public
function
getTopLines
()
89
{
90
return
$this->_topLines
;
91
}
92
99
public
function
hasFlag
($flag)
100
{
101
return
isset($this->_flags[$flag]);
102
}
103
109
public
function
getFlags
()
110
{
111
return
$this->_flags
;
112
}
113
}
Zend_Mail_Part\$_topLines
$_topLines
Definition:
Part.php:68
Zend_Mail_Message\getFlags
getFlags()
Definition:
Message.php:109
Zend_Mail_Part
Definition:
Part.php:50
Zend_Mail_Message\__construct
__construct(array $params)
Definition:
Message.php:57
Zend_Mail_Exception
Definition:
Exception.php:35
Zend_Mail_Message\hasFlag
hasFlag($flag)
Definition:
Message.php:99
Magento\Framework\Filesystem\Driver\file_get_contents
file_get_contents()
Definition:
http_mock.php:15
Zend_Mail_Message\$_flags
$_flags
Definition:
Message.php:45
Magento\Setup\Model\Cron\is_resource
is_resource()
Definition:
JobFactoryTest.php:220
Zend_Mail_Message
Definition:
Message.php:39
$params
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition:
website.php:18
Zend_Mail_Message_Interface
Definition:
Interface.php:32
Zend_Mail_Message\getTopLines
getTopLines()
Definition:
Message.php:88