Skip to content

Instantly share code, notes, and snippets.

@platoosom
Created September 29, 2017 10:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save platoosom/092c1ba69ef9ddf02559b8bdab6ed3c6 to your computer and use it in GitHub Desktop.
Save platoosom/092c1ba69ef9ddf02559b8bdab6ed3c6 to your computer and use it in GitHub Desktop.
<?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