| 1 | <?php | ||
| 25 | abstract class TaskBase | ||
| 26 | { | ||
| 27 | /** | ||
| 28 | * Initializes a task | ||
| 29 | */ | ||
| 30 | public function __construct() | ||
| 33 | |||
| 34 | /** | ||
| 35 | * Executes the task | ||
| 36 | * | ||
| 37 | * @param array $uParameters parameters | ||
| 38 | * @param FormatterInterface $uFormatter formatter class | ||
| 39 | * | ||
| 40 | * @return int exit code | ||
| 41 | */ | ||
| 42 | abstract public function executeTask(array $uParameters, FormatterInterface $uFormatter); | ||
| 43 | |||
| 44 | /** | ||
| 45 | * Returns the usage form and list of available parameters | ||
| 46 | * | ||
| 47 | * @param FormatterInterface $uFormatter formatter class | ||
| 48 | * | ||
| 49 | * @return void | ||
| 50 | */ | ||
| 51 | abstract public function help(FormatterInterface $uFormatter); | ||
| 52 | } | ||
| 53 |