Changeset 11338
- Timestamp:
- 09/06/08 08:30:45 (3 months ago)
- Files:
-
- branches/1.1/lib/task/sfBaseTask.class.php (modified) (2 diffs)
- branches/1.2/lib/task/sfBaseTask.class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/task/sfBaseTask.class.php
r9664 r11338 27 27 protected function doRun(sfCommandManager $commandManager, $options) 28 28 { 29 $this->dispatcher->filter(new sfEvent($this, 'command.filter_options', array('command_manager' => $commandManager)), $options); 30 29 31 $this->process($commandManager, $options); 32 33 $event = new sfEvent($this, 'command.pre_command', array('arguments' => $commandManager->getArgumentValues(), 'options' => $commandManager->getOptionValues())); 34 $this->dispatcher->notifyUntil($event); 35 if ($event->isProcessed()) 36 { 37 return $this->getReturnValue(); 38 } 30 39 31 40 $this->checkProjectExists(); … … 66 75 } 67 76 68 return $this->execute($commandManager->getArgumentValues(), $commandManager->getOptionValues()); 77 $ret = $this->execute($commandManager->getArgumentValues(), $commandManager->getOptionValues()); 78 79 $this->dispatcher->notify(new sfEvent($this, 'command.post_command')); 80 81 return $ret; 69 82 } 70 83 branches/1.2/lib/task/sfBaseTask.class.php
r11293 r11338 27 27 protected function doRun(sfCommandManager $commandManager, $options) 28 28 { 29 $this->dispatcher->filter(new sfEvent($this, 'command.filter_options', array('command_manager' => $commandManager)), $options); 30 29 31 $this->process($commandManager, $options); 32 33 $event = new sfEvent($this, 'command.pre_command', array('arguments' => $commandManager->getArgumentValues(), 'options' => $commandManager->getOptionValues())); 34 $this->dispatcher->notifyUntil($event); 35 if ($event->isProcessed()) 36 { 37 return $this->getReturnValue(); 38 } 30 39 31 40 $this->checkProjectExists(); … … 81 90 } 82 91 83 return $this->execute($commandManager->getArgumentValues(), $commandManager->getOptionValues()); 92 $ret = $this->execute($commandManager->getArgumentValues(), $commandManager->getOptionValues()); 93 94 $this->dispatcher->notify(new sfEvent($this, 'command.post_command')); 95 96 return $ret; 84 97 } 85 98