|
Revision 10197, 1.3 kB
(checked in by fabien, 5 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 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
require_once(dirname(__FILE__).'/sfPluginBaseTask.class.php'); |
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 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 |
|
|---|