Encapsulates the storage and retrieval of reports generated as PDF files. More...
Public Member Functions | |
__construct ($person, $project) | |
select_report ($tok, $strict=true) | |
store_report (&$data, &$html, &$pdf, $special=0, $auto=0, $type=0, $year=REPORTING_YEAR, $encrypt=false) | |
Store a new report. | |
fetch_pdf ($tok, $strict=true) | |
mark_submitted ($tok) | |
metadata ($field) | |
get_report_project_id () | |
Static Public Member Functions | |
static | list_reports ($uarr, $subm=1, $lim=1, $special=0, $type=0, $year="") |
static | list_project_reports ($proj_id, $lim=1, $special=0, $type=RPTP_LEADER, $year=REPORTING_YEAR) |
static | list_user_project_reports ($proj_id, $user_id, $lim=1, $special=0, $type=RPTP_LEADER, $year=null) |
Encapsulates the storage and retrieval of reports generated as PDF files.
ReportStorage::fetch_pdf | ( | $ | tok, | |
$ | strict = true | |||
) |
static ReportStorage::list_reports | ( | $ | uarr, | |
$ | subm = 1 , |
|||
$ | lim = 1 , |
|||
$ | special = 0 , |
|||
$ | type = 0 , |
|||
$ | year = "" | |||
) | [static] |
Returns an array of report entries for users uarr with as many as lim entries per user. By default, submitted reports are considered, which can be changed with subm. uarr is either an array of numeric user IDs or an integer (for the user ID).
ReportStorage::metadata | ( | $ | field | ) |
Return a field from the cache. If the field is not available, the state is considered stale and a DB request is made.
ReportStorage::select_report | ( | $ | tok, | |
$ | strict = true | |||
) |
Tries to "select" a report for download. If the user_id does not match, the request is denied and the state of the object is not changed.