1. sfPluginAddChannelTask.class.php
  2. /** * Installs a plugin. * * @package symfony * @subpackage task * @author Fabien Potencier * @version SVN: $Id: sfPluginAddChannelTask.class.php 11750 2008-09-23 18:33:28Z Carl.Vondrick $ */
  3. class sfPluginAddChannelTask extends sfPluginBaseTask
  4. {
  5. /**
  6. * @see sfTask
  7. */
  8. protected function configure()
  9. {
  10. $this->addArguments(array(
  11. new sfCommandArgument('name', sfCommandArgument::REQUIRED, 'The channel name'),
  12. ));
  13. $this->namespace = 'plugin';
  14. $this->name = 'add-channel';
  15. $this->briefDescription = 'Add a new PEAR channel';
  16. $this->detailedDescription = <<<EOF
  17. The [plugin:add-channel|INFO] task adds a new PEAR channel:
  18. [./symfony plugin:add-channel symfony.plugins.pear.example.com|INFO]
  19. EOF;
  20. }
  21. /**
  22. * @see sfTask
  23. */
  24. protected function execute($arguments = array(), $options = array())
  25. {
  26. $this->logSection('plugin', sprintf('add channel "%s"', $arguments['name']));
  27. $this->getPluginManager()->getEnvironment()->registerChannel($arguments['name']);
  28. }
  29. }

Debug toolbar