28 $this->logger =
$GLOBALS[
'DIC']->logger()->exc();
79 $download_name =
$input[0];
82 $this->logger->debug(
"Interaction -> input[0] download name MUST BE FULL PATH=> " . $download_name->getValue());
83 $this->logger->debug(
"Interaction -> input[1] zip name MUST BE THE NAME WITHOUT EXTENSION. => " . $zip_name->getValue());
85 if ($user_selected_option->
getValue() != self::OPTION_DOWNLOAD) {
86 $this->logger->info(
'Download canceled');
88 $filesystem =
$DIC->filesystem()->temp();
90 $path = LegacyPathHelper::createRelativePath($zip_name->getValue());
91 }
catch (InvalidArgumentException
$e) {
94 if (!is_null($path) && $filesystem->has($path)) {
95 $filesystem->deleteDir(dirname($path));
101 $this->logger->info(
"Delivering File.");
104 $zip_name = $zip_name->getValue();
106 $ending = substr($zip_name, -4);
107 if ($ending !=
".zip") {
109 $this->logger->info(
"Add .zip extension");
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
getInputTypes()
Type[] A list of types that are taken as input.
getRemoveOption()
@inheritDoc
interaction(array $input, Option $user_selected_option, Bucket $bucket)
@inheritDoc
getOutputType()
@inheritDoc
getOptions(array $input)
@inheritDoc
static deliverFileAttached($path_to_file, $download_file_name='', $mime_type='', $delete_file=false)
void