-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathActor.class.php
More file actions
51 lines (39 loc) · 1.11 KB
/
Copy pathActor.class.php
File metadata and controls
51 lines (39 loc) · 1.11 KB
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
45
46
47
48
49
50
51
<?php
/**
* @author Pierre-Henry Soria <pierrehenrysoria@gmail.com>
* @copyright (c) 2015, Pierre-Henry Soria. All Rights Reserved.
* @license MIT License <http://www.opensource.org/licenses/mit-license.php>
* @link http://github.com/pH-7/
*/
require_once 'Base.class.php';
class Actor extends Base
{
private $_sName, $_sBirthDate;
/***** Setters *****/
public function setName($sName)
{
if (!empty($sName) && is_string($sName) && strlen($sName) >= 3 && strlen($sName) <=
30)
$this->_sName = $sName;
else
throw new Exception('Invalid Actor Name Format');
return $this;
}
public function setBirthDate($sBirthDate)
{
if ($this->checkDate($sBirthDate))
$this->_sBirthDate = $sBirthDate;
else
throw new Exception('Invalid Birth Date Format');
return $this;
}
/***** Getters *****/
public function getName()
{
return $this->_sName;
}
public function getBirthDate()
{
return $this->_sBirthDate;
}
}