mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-09-08 14:28:57 +02:00
[Nostromo] Refactor FS Tasks flagging system
This commit is contained in:
@@ -48,33 +48,6 @@ 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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user