Development

/branches/1.1/lib/task/plugin/sfPluginAddChannelTask.class.php

You must first sign up to be able to contribute.

root/branches/1.1/lib/task/plugin/sfPluginAddChannelTask.class.php

Revision 10197, 1.3 kB (checked in by fabien, 6 years ago)

fixed typo in plugin:add-channel task

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 /*
4  * This file is part of the symfony package.
5  * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 require_once(dirname(__FILE__).'/sfPluginBaseTask.class.php');
12
13 /**
14  * Installs a plugin.
15  *
16  * @package    symfony
17  * @subpackage task
18  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
19  * @version    SVN: $Id$
20  */
21 class sfPluginAddChannelTask extends sfPluginBaseTask
22 {
23   /**
24    * @see sfTask
25    */
26   protected function configure()
27   {
28     $this->addArguments(array(
29       new sfCommandArgument('name', sfCommandArgument::REQUIRED, 'The channel name'),
30     ));
31
32     $this->namespace = 'plugin';
33     $this->name = 'add-channel';
34
35     $this->briefDescription = 'Add a new PEAR channel';
36
37     $this->detailedDescription = <<<EOF
38 The [plugin:add-channel|INFO] task add a new PEAR channel:
39
40   [./symfony plugin:add-channel symfony.plugins.pear.example.com|INFO]
41 EOF;
42   }
43
44   /**
45    * @see sfTask
46    */
47   protected function execute($arguments = array(), $options = array())
48   {
49     $this->logSection('plugin', sprintf('add channel "%s"', $arguments['name']));
50
51     $this->getPluginManager()->getEnvironment()->registerChannel($arguments['name']);
52   }
53 }
54
Note: See TracBrowser for help on using the browser.