Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. class SalesReport {
  4.     // Data for report
  5.     private $data = array();
  6.  
  7.     public function __construct($date_from, $date_to) {
  8.         // TODO: connect to DB
  9.         $this->data = array(
  10.             $date_from => 100,
  11.             $date_to => 200,
  12.         );
  13.     }
  14. }
  15.  
  16. class PDFSalesReport extends SalesReport {
  17.  
  18. }
  19. class XLSXSalesReport extends SalesReport {
  20.  
  21. }
  22.  
  23. $report_pdf = new PDFSalesReport('2018-01-01', '2018-01-02');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement