New version. Added getters to config and task.

New concept of "stage" where the task runs.
This commit is contained in:
Andrs Montaez
2012-02-24 13:39:40 -02:00
parent de772028bb
commit 3f0efc1a42
9 changed files with 39 additions and 17 deletions
+13 -1
View File
@@ -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()
{
}