-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMessageTypes.php
More file actions
44 lines (37 loc) · 753 Bytes
/
MessageTypes.php
File metadata and controls
44 lines (37 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
class Person
{
protected $firstname;
protected $lastname;
protected $email;
protected $spouse;
public function __construct($firstname, $lastname, $email, $spouse)
{
$this->firstname = $firstname;
$this->lastname = $lastname;
$this->email = $email;
$this->spouse = $spouse;
}
public function getFullname()
{
return $this->firstname.' '.$this->lastname;
}
public function setFirstname($firstname)
{
$this->firstname = $firstname;
}
public function name($param)
{
return null;
}
public function getSpouseName()
{
return $this->spouse->getFullname();
}
public function sendBirthdayEmail($mailer)
{
$mailer->setEmail($this->email);
$mailer->setBody('Happy birthday');
$mailer->send();
}
}