mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-08-29 10:38:57 +02:00
New version. Added getters to config and task.
New concept of "stage" where the task runs.
This commit is contained in:
@@ -3,15 +3,17 @@ abstract class Mage_Task_TaskAbstract
|
||||
{
|
||||
protected $_config = null;
|
||||
protected $_inRollback = false;
|
||||
protected $_stage = null;
|
||||
|
||||
public abstract function getName();
|
||||
|
||||
public abstract function run();
|
||||
|
||||
public final function __construct(Mage_Config $config, $inRollback = false)
|
||||
public final function __construct(Mage_Config $config, $inRollback = false, $stage = null)
|
||||
{
|
||||
$this->_config = $config;
|
||||
$this->_inRollback = $inRollback;
|
||||
$this->_stage = $stage;
|
||||
}
|
||||
|
||||
public function inRollback()
|
||||
@@ -19,6 +21,16 @@ abstract class Mage_Task_TaskAbstract
|
||||
return $this->_inRollback;
|
||||
}
|
||||
|
||||
public function getStage()
|
||||
{
|
||||
return $this->_stage;
|
||||
}
|
||||
|
||||
public function getConfig()
|
||||
{
|
||||
return $this->_config;
|
||||
}
|
||||
|
||||
public function init()
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user