Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Person {
- private $name;
- private $age;
- public function __construct($name, $age)
- {
- $this->name = $name;
- $this->age = $age;
- }
- /**
- * Gets the value of name.
- *
- * @return mixed
- */
- public function getName()
- {
- return $this->name;
- }
- /**
- * Sets the value of name.
- *
- * @param mixed $name the name
- *
- * @return self
- */
- private function _setName($name)
- {
- $this->name = $name;
- return $this;
- }
- /**
- * Gets the value of age.
- *
- * @return mixed
- */
- public function getAge()
- {
- return $this->age;
- }
- /**
- * Sets the value of age.
- *
- * @param mixed $age the age
- *
- * @return self
- */
- private function _setAge($age)
- {
- $this->age = $age;
- return $this;
- }
- }
Advertisement