|
ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Helper class to be used in sample code. More...
Collaboration diagram for PhpOffice\PhpSpreadsheet\Helper\Sample:Public Member Functions | |
| isCli () | |
| Returns whether we run on CLI or browser. More... | |
| getScriptFilename () | |
| Return the filename currently being executed. More... | |
| isIndex () | |
| Whether we are executing the index page. More... | |
| getPageTitle () | |
| Return the page title. More... | |
| getPageHeading () | |
| Return the page heading. More... | |
| getSamples () | |
| Returns an array of all known samples. More... | |
| write (Spreadsheet $spreadsheet, $filename, array $writers=['Xlsx', 'Xls']) | |
| Write documents. More... | |
| getFilename ($filename, $extension='xlsx') | |
| Returns the filename that should be used for sample output. More... | |
| getTemporaryFilename ($extension='xlsx') | |
| Return a random temporary file name. More... | |
| log ($message) | |
| logEndingNotes () | |
| Log ending notes. More... | |
| logWrite (IWriter $writer, $path, $callStartTime) | |
| Log a line about the write operation. More... | |
| logRead ($format, $path, $callStartTime) | |
| Log a line about the read operation. More... | |
Protected Member Functions | |
| isDirOrMkdir (string $folder) | |
Private Member Functions | |
| getTemporaryFolder () | |
| Returns the temporary directory and make sure it exists. More... | |
Helper class to be used in sample code.
Definition at line 18 of file Sample.php.
| PhpOffice\PhpSpreadsheet\Helper\Sample::getFilename | ( | $filename, | |
$extension = 'xlsx' |
|||
| ) |
Returns the filename that should be used for sample output.
| string | $filename | |
| string | $extension |
Definition at line 157 of file Sample.php.
References $filename, and PhpOffice\PhpSpreadsheet\Helper\Sample\getTemporaryFolder().
Referenced by PhpOffice\PhpSpreadsheet\Helper\Sample\write().
Here is the call graph for this function:
Here is the caller graph for this function:| PhpOffice\PhpSpreadsheet\Helper\Sample::getPageHeading | ( | ) |
Return the page heading.
Definition at line 65 of file Sample.php.
References PhpOffice\PhpSpreadsheet\Helper\Sample\getScriptFilename(), and PhpOffice\PhpSpreadsheet\Helper\Sample\isIndex().
Here is the call graph for this function:| PhpOffice\PhpSpreadsheet\Helper\Sample::getPageTitle | ( | ) |
Return the page title.
Definition at line 55 of file Sample.php.
References PhpOffice\PhpSpreadsheet\Helper\Sample\getScriptFilename(), and PhpOffice\PhpSpreadsheet\Helper\Sample\isIndex().
Here is the call graph for this function:| PhpOffice\PhpSpreadsheet\Helper\Sample::getSamples | ( | ) |
Returns an array of all known samples.
Definition at line 75 of file Sample.php.
| PhpOffice\PhpSpreadsheet\Helper\Sample::getScriptFilename | ( | ) |
Return the filename currently being executed.
Definition at line 35 of file Sample.php.
References $_SERVER.
Referenced by PhpOffice\PhpSpreadsheet\Helper\Sample\getPageHeading(), PhpOffice\PhpSpreadsheet\Helper\Sample\getPageTitle(), and PhpOffice\PhpSpreadsheet\Helper\Sample\isIndex().
Here is the caller graph for this function:| PhpOffice\PhpSpreadsheet\Helper\Sample::getTemporaryFilename | ( | $extension = 'xlsx' | ) |
Return a random temporary file name.
| string | $extension |
Definition at line 171 of file Sample.php.
References PhpOffice\PhpSpreadsheet\Helper\Sample\getTemporaryFolder().
Here is the call graph for this function:
|
private |
Returns the temporary directory and make sure it exists.
Definition at line 139 of file Sample.php.
References PhpOffice\PhpSpreadsheet\Helper\Sample\isDirOrMkdir().
Referenced by PhpOffice\PhpSpreadsheet\Helper\Sample\getFilename(), and PhpOffice\PhpSpreadsheet\Helper\Sample\getTemporaryFilename().
Here is the call graph for this function:
Here is the caller graph for this function:| PhpOffice\PhpSpreadsheet\Helper\Sample::isCli | ( | ) |
Returns whether we run on CLI or browser.
Definition at line 25 of file Sample.php.
Referenced by PhpOffice\PhpSpreadsheet\Helper\Sample\log().
Here is the caller graph for this function:
|
protected |
Definition at line 129 of file Sample.php.
Referenced by PhpOffice\PhpSpreadsheet\Helper\Sample\getTemporaryFolder().
Here is the caller graph for this function:| PhpOffice\PhpSpreadsheet\Helper\Sample::isIndex | ( | ) |
Whether we are executing the index page.
Definition at line 45 of file Sample.php.
References PhpOffice\PhpSpreadsheet\Helper\Sample\getScriptFilename().
Referenced by PhpOffice\PhpSpreadsheet\Helper\Sample\getPageHeading(), and PhpOffice\PhpSpreadsheet\Helper\Sample\getPageTitle().
Here is the call graph for this function:
Here is the caller graph for this function:| PhpOffice\PhpSpreadsheet\Helper\Sample::log | ( | $message | ) |
Definition at line 179 of file Sample.php.
References $message, PhpOffice\PhpSpreadsheet\Helper\Sample\isCli(), and PHP_EOL.
Referenced by PhpOffice\PhpSpreadsheet\Helper\Sample\logEndingNotes(), PhpOffice\PhpSpreadsheet\Helper\Sample\logRead(), and PhpOffice\PhpSpreadsheet\Helper\Sample\logWrite().
Here is the call graph for this function:
Here is the caller graph for this function:| PhpOffice\PhpSpreadsheet\Helper\Sample::logEndingNotes | ( | ) |
Log ending notes.
Definition at line 188 of file Sample.php.
References PhpOffice\PhpSpreadsheet\Helper\Sample\log().
Referenced by PhpOffice\PhpSpreadsheet\Helper\Sample\write().
Here is the call graph for this function:
Here is the caller graph for this function:| PhpOffice\PhpSpreadsheet\Helper\Sample::logRead | ( | $format, | |
| $path, | |||
| $callStartTime | |||
| ) |
Log a line about the read operation.
| string | $format | |
| string | $path | |
| float | $callStartTime |
Definition at line 218 of file Sample.php.
References $message, and PhpOffice\PhpSpreadsheet\Helper\Sample\log().
Here is the call graph for this function:| PhpOffice\PhpSpreadsheet\Helper\Sample::logWrite | ( | IWriter | $writer, |
| $path, | |||
| $callStartTime | |||
| ) |
Log a line about the write operation.
| string | $path | |
| float | $callStartTime |
Definition at line 200 of file Sample.php.
References $format, $message, and PhpOffice\PhpSpreadsheet\Helper\Sample\log().
Referenced by PhpOffice\PhpSpreadsheet\Helper\Sample\write().
Here is the call graph for this function:
Here is the caller graph for this function:| PhpOffice\PhpSpreadsheet\Helper\Sample::write | ( | Spreadsheet | $spreadsheet, |
| $filename, | |||
| array | $writers = ['Xlsx', 'Xls'] |
||
| ) |
Write documents.
| string | $filename | |
| string[] | $writers |
Definition at line 112 of file Sample.php.
References $filename, $path, PhpOffice\PhpSpreadsheet\IOFactory\createWriter(), PhpOffice\PhpSpreadsheet\Helper\Sample\getFilename(), PhpOffice\PhpSpreadsheet\Helper\Sample\logEndingNotes(), PhpOffice\PhpSpreadsheet\Helper\Sample\logWrite(), and PhpOffice\PhpSpreadsheet\Spreadsheet\setActiveSheetIndex().
Here is the call graph for this function: