ReportGenerator
class ReportGenerator
Properties
Collection | $options | Options for this report. |
|
string | $name | Name of the report for use in text. |
|
string | $filename | Name of the report for use as (part of) a filename. |
|
string | $extension | File extension of the report file. |
|
protected mixed | $source | Source this report belongs to (e.g. a volume). |
|
protected array | $tmpFiles | Temporary files that are created when generating a report. |
|
protected Collection|null | $labels | Cache for labels of all label trees that are used for this report. |
Methods
Get the report generator for the given type.
Create a report generator instance.
Generate the report.
Internal function to generate the report.
Set the source.
Get the report name.
Get the report filename.
Get the filename with extension.
Constructs a label name from the names of all parent labels and the label itself.
Get all labels that belong to the label tree of the given label.
Should this report separate the output files for different label trees?
Should this report separate the output files for different user?
Returns the array of label ids to which this report should be restricted.
Determines if this report is restricted to a subset of labels.
Details
at line 75
static ReportGenerator
get(string $sourceClass, ReportType $type, array $options = [])
Get the report generator for the given type.
at line 103
__construct(array $options = [])
Create a report generator instance.
at line 116
string
generate(mixed $source)
Generate the report.
at line 153
generateReport(string $path)
Internal function to generate the report.
(public for better testability)
at line 163
setSource(mixed $source)
Set the source.
at line 173
string
getName()
Get the report name.
at line 183
string
getFilename()
Get the report filename.
at line 193
string
getFullFilename()
Get the filename with extension.
at line 206
string
expandLabelName(int $id)
Constructs a label name from the names of all parent labels and the label itself.
Example: Animalia > Annelida > Polychaeta > Buskiella sp
at line 237
protected Collection
getSiblingLabels(int $id)
Get all labels that belong to the label tree of the given label.
at line 253
protected bool
shouldSeparateLabelTrees()
Should this report separate the output files for different label trees?
at line 263
protected bool
shouldSeparateUsers()
Should this report separate the output files for different user?
at line 273
protected array
getOnlyLabels()
Returns the array of label ids to which this report should be restricted.
at line 283
protected bool
isRestrictedToLabels()
Determines if this report is restricted to a subset of labels.