Files
opensourcepos/app/Models/Reports/Report.php
objecttothis 32192b90c3 CI4 bugfixes
- Added session variable instantiation where needed.
- Added tabular helper to autoload
- removed tabular helper reference where no longer needed.
- Remove esc() references where it was causing display problems.
- Remove excess whitespace on blank line
- Remove unecessary using reference
- Make parameters for dinner table functions nullable
2023-04-27 21:54:11 -04:00

36 lines
930 B
PHP

<?php
namespace App\Models\Reports;
use CodeIgniter\HTTP\Response;
use CodeIgniter\Model;
/**
*
*
* @property response response
*
*/
abstract class Report extends Model
{
function __construct()
{
parent::__construct();
//Make sure the report is not cached by the browser
$this->response->setHeader('Last-Modified', gmdate('D, d M Y H:i:s') . ' GMT');
$this->response->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate');
$this->response->setHeader('Cache-Control', 'post-check=0, pre-check=0');
$this->response->setHeader('Pragma', 'no-cache');
}
// Returns the column names used for the report
public abstract function getDataColumns(): array;
// Returns all the data to be populated into the report
public abstract function getData(array $inputs): array;
// Returns key=>value pairing of summary data for the report
public abstract function getSummaryData(array $inputs): array;
}