Definition at line 14 of file AbstractArchive.php.
◆ _readFile()
Read data from file. If file can't be opened, throw to exception.
- Parameters
-
- Returns
- string
- Exceptions
-
Definition at line 40 of file AbstractArchive.php.
45 if (
$data ===
false) {
46 throw new \Magento\Framework\Exception\LocalizedException(
47 new \
Magento\Framework\Phrase(
"Can't get contents from: %1", [
$source])
◆ _writeFile()
_writeFile |
( |
|
$destination, |
|
|
|
$data |
|
) |
| |
|
protected |
Write data to file. If file can't be opened - throw exception
- Parameters
-
string | $destination | |
string | $data | |
- Returns
- true
- Exceptions
-
Definition at line 24 of file AbstractArchive.php.
26 $destination = trim($destination);
28 throw new \Exception(
"Can't write to file: " . $destination);
◆ getFilename()
getFilename |
( |
|
$source, |
|
|
|
$withExtension = false |
|
) |
| |
Get file name from source (URI) without last extension.
- Parameters
-
string | $source | |
bool | $withExtension | |
- Returns
- string
Definition at line 61 of file AbstractArchive.php.
64 if (!$withExtension) {
65 $file = substr($file, 0, strrpos($file,
'.'));
The documentation for this class was generated from the following file: