Added Flags to FS tasks (closes #344)

This commit is contained in:
thePanz
2017-02-07 23:28:10 +01:00
parent b36f90e80a
commit 33364f5e24
6 changed files with 88 additions and 17 deletions
+27
View File
@@ -46,6 +46,33 @@ abstract class AbstractFileTask extends AbstractTask
*/
abstract protected function getParameters();
/**
* Returns the default "flags".
*
* @return null|string
*/
protected function getDefaultFlags()
{
return null;
}
/**
* Returns the flags for the current command.
*
* @return string
*/
protected function getFlags()
{
$options = $this->getOptions();
$flags = $this->getDefaultFlags();
if (array_key_exists('flags', $options) && !empty($options['flags'])) {
$flags = trim($options['flags']);
}
return empty($flags) ? '' : $flags.' ';
}
/**
* Returns a file with the placeholders replaced
*