Rollback awareness.

Tasks are aware if they are in rollbacks; they will be invoked only if
they implement the new interface RollbackAware.
This commit is contained in:
Andrs Montaez
2012-01-03 23:25:42 -02:00
parent 01cbd0e447
commit 9cf720c602
9 changed files with 70 additions and 23 deletions
+8 -1
View File
@@ -2,14 +2,21 @@
abstract class Mage_Task_TaskAbstract
{
protected $_config = null;
protected $_inRollback = false;
public abstract function getName();
public abstract function run();
public final function __construct(Mage_Config $config)
public final function __construct(Mage_Config $config, $inRollback = false)
{
$this->_config = $config;
$this->_inRollback = $inRollback;
}
public function inRollback()
{
return $this->_inRollback;
}
public function init()