Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
Class.Address.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 
7 namespace Dcp\Mail;
8 
9 class Address
10 {
11  const className = __CLASS__;
12  public $address = '';
13  public $name = '';
14  public function __construct($address, $name = '')
15  {
16  $this->address = $address;
17  $this->name = $name;
18  }
19  public function __toString()
20  {
21  if ($this->name !== '') {
22  return sprintf("%s <%s>", $this->name, $this->address);
23  } else {
24  return sprintf("<%s>", $this->address);
25  }
26  }
27 }
__construct($address, $name= '')
print $fam getTitle() $fam name
← centre documentaire © anakeen