Guest User

Untitled

a guest
Sep 25th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. <?php
  2.  
  3. class Personne
  4. {
  5.  
  6. public $lastName;
  7.  
  8. public $firstName;
  9.  
  10. public $adress;
  11.  
  12. public $birthday;
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19. public function getLastName(): String
  20. {
  21. return $this->lastname;
  22. }
  23.  
  24. public function setLastName(String $lastName): Personne
  25. {
  26. $this->lastNane = $lastName;
  27. return $this;
  28. }
  29.  
  30. public function getFirstName(): String
  31. {
  32. return $this->firstname;
  33. }
  34.  
  35. public function setFirstName(String $firstName): Personne
  36. {
  37. $this->firstName = $firstName;
  38. return $this;
  39. }
  40.  
  41. public function getAdress(): String
  42. {
  43. return $this->adress;
  44. }
  45.  
  46. public function setAdress(String $adress): Personne
  47. {
  48. $this->adress = $adress;
  49. return $this;
  50. }
  51.  
  52. public function getBirthday(): Int
  53. {
  54. return $this->birthday;
  55. }
  56.  
  57. public function setBirthday(Int $birthday): Personne
  58. {
  59. $this->birthday = $birthday;
  60. return $this;
  61. }
  62.  
  63. public function calculAge(): Int
  64. {
  65. $this->$birthday = (2018-$birthday);
  66. }
  67.  
  68. }
  69.  
  70. ?>
Add Comment
Please, Sign In to add comment