Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Example_Customer {
- // Some properties
- protected $name = "Joe Schmoe";
- protected $street = "1st St NW";
- protected $city = "Washington";
- protected $zipcode = "20008";
- protected $spamLikeThereIsNoTomorrow = true;
- // Getter methods for the properties
- public function getName() { return $this->name; }
- public function getStreet() { return $this->street; }
- public function getCity() { return $this->city; }
- public function getZipcode() { return $this->zipcode; }
- public function getSpamLikeThereIsNoTomorrow() {
- return $this->spamLikeThereIsNoTomorrow;
- }
- // Setters are left as an exercise :)
- }
Add Comment
Please, Sign In to add comment