Akuba

Untitled

Apr 20th, 2016
276
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.92 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. class Person {
  5.     private $name;
  6.     private $age;
  7.  
  8.     public function __construct($name, $age)
  9.     {
  10.         $this->name = $name;
  11.         $this->age = $age;
  12.     }
  13.  
  14.    
  15.    
  16.  
  17.  
  18.     /**
  19.      * Gets the value of name.
  20.      *
  21.      * @return mixed
  22.      */
  23.     public function getName()
  24.     {
  25.         return $this->name;
  26.     }
  27.  
  28.     /**
  29.      * Sets the value of name.
  30.      *
  31.      * @param mixed $name the name
  32.      *
  33.      * @return self
  34.      */
  35.     private function _setName($name)
  36.     {
  37.         $this->name = $name;
  38.  
  39.         return $this;
  40.     }
  41.  
  42.     /**
  43.      * Gets the value of age.
  44.      *
  45.      * @return mixed
  46.      */
  47.     public function getAge()
  48.     {
  49.         return $this->age;
  50.     }
  51.  
  52.     /**
  53.      * Sets the value of age.
  54.      *
  55.      * @param mixed $age the age
  56.      *
  57.      * @return self
  58.      */
  59.     private function _setAge($age)
  60.     {
  61.         $this->age = $age;
  62.  
  63.         return $this;
  64.     }
  65. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment