| Server IP : 213.186.33.4 / Your IP : 216.73.216.193 Web Server : Apache System : Linux webm006.cluster103.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : awebpaca ( 35430) PHP Version : 8.5.0 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/a/w/e/awebpaca/Dolibarr/htdocs/includes/webklex/php-imap/src/ |
Upload File : |
<?php
/*
* File: Address.php
* Category: -
* Author: M. Goldenbaum
* Created: 01.01.21 21:17
* Updated: -
*
* Description:
* -
*/
namespace Webklex\PHPIMAP;
/**
* Class Address
*
* @package Webklex\PHPIMAP
*/
class Address {
/**
* Address attributes
* @var string $personal
* @var string $mailbox
* @var string $host
* @var string $mail
* @var string $full
*/
public $personal = "";
public $mailbox = "";
public $host = "";
public $mail = "";
public $full = "";
/**
* Address constructor.
* @param object $object
*/
public function __construct($object) {
if (property_exists($object, "personal")){ $this->personal = $object->personal; }
if (property_exists($object, "mailbox")){ $this->mailbox = $object->mailbox; }
if (property_exists($object, "host")){ $this->host = $object->host; }
if (property_exists($object, "mail")){ $this->mail = $object->mail; }
if (property_exists($object, "full")){ $this->full = $object->full; }
}
/**
* Return the stringified address
*
* @return string
*/
public function __toString() {
return $this->full ? $this->full : "";
}
/**
* Return the serialized address
*
* @return array
*/
public function __serialize(){
return [
"personal" => $this->personal,
"mailbox" => $this->mailbox,
"host" => $this->host,
"mail" => $this->mail,
"full" => $this->full,
];
}
/**
* Convert instance to array
*
* @return array
*/
public function toArray(){
return $this->__serialize();
}
/**
* Return the stringified attribute
*
* @return string
*/
public function toString(){
return $this->__toString();
}
}