Created
September 29, 2017 10:48
-
-
Save platoosom/092c1ba69ef9ddf02559b8bdab6ed3c6 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 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