Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
class PostBase {
public $id;
public $title;
public $description;
public function setID($id) {
$this->id = $id;
}
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
You can’t perform that action at this time.