Page Menu
Home
WMGMC Issues
搜索
Configure Global Search
登录
Files
F16162
EmailAddress.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
订阅
标记用于日后
授予令牌
Size
1 KB
Referenced Files
None
订阅者
None
EmailAddress.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Ddeboer\Imap\Message
;
/**
* An e-mail address.
*/
final
class
EmailAddress
{
private
string
$mailbox
;
private
?
string
$hostname
;
private
?
string
$name
;
private
?
string
$address
;
public
function
__construct
(
string
$mailbox
,
string
$hostname
=
null
,
string
$name
=
null
)
{
$this
->
mailbox
=
$mailbox
;
$this
->
hostname
=
$hostname
;
$this
->
name
=
$name
;
$this
->
address
=
null
;
if
(
null
!==
$hostname
)
{
$this
->
address
=
$mailbox
.
'@'
.
$hostname
;
}
}
/**
* @return null|string
*/
public
function
getAddress
()
{
return
$this
->
address
;
}
/**
* Returns address with person name.
*/
public
function
getFullAddress
():
string
{
$address
=
\sprintf
(
'%s@%s'
,
$this
->
mailbox
,
$this
->
hostname
);
if
(
null
!==
$this
->
name
)
{
$address
=
\sprintf
(
'"%s" <%s>'
,
\addcslashes
(
$this
->
name
,
'"'
),
$address
);
}
return
$address
;
}
public
function
getMailbox
():
string
{
return
$this
->
mailbox
;
}
/**
* @return null|string
*/
public
function
getHostname
()
{
return
$this
->
hostname
;
}
/**
* @return null|string
*/
public
function
getName
()
{
return
$this
->
name
;
}
}
File Metadata
详情
附加的
Mime Type
text/x-php
Expires
9月 11 Thu, 2:00 PM (18 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5632
默认替代文本
EmailAddress.php (1 KB)
Attached To
Mode
rMAILCOW mailcow-tracking
附加的
Detach File
Event Timeline
Log In to Comment