Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class SalesReport {
- // Data for report
- private $data = array();
- public function __construct($date_from, $date_to) {
- // TODO: connect to DB
- $this->data = array(
- $date_from => 100,
- $date_to => 200,
- );
- }
- }
- class PDFSalesReport extends SalesReport {
- }
- class XLSXSalesReport extends SalesReport {
- }
- $report_pdf = new PDFSalesReport('2018-01-01', '2018-01-02');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement