Last active
September 30, 2017 03:17
-
-
Save platoosom/e94e5c17b7cbd1cf5e036ae24d66d193 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class PostBase { | |
public $id; | |
public $title; | |
public $description; | |
public function setID($id) { | |
$this->id = $id; | |
} | |
final public function getID() { | |
return $this->id; | |
} | |
} | |
class Page extends PostBase { | |
public function getPagePrefix() { | |
return 'P.'; | |
} | |
} | |
class Item extends PostBase { | |
public function getID() { | |
return 'Item#'. $this->id; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment