Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
class BasePost {
public $id;
public $title;
public $description;
public function save($datas) {
$this->connectdb();
$this->insert($datas);
}
}
class Post extends BasePost {
public $categories;
public function getCategories() {
return $this->categories;
}
}
class Page extends BasePost {
public $order_number;
public function setOrder($order_number) {
$this->orderNumber = $order_number;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment