$mg = new Feed_Manage($deps);
if ($command->command_name == 'add') {
$mg->addFeed($command->command->args['feed']);
- } else if ($command->command_name == 'remove') {
+ } else if ($command->command_name == 'remove') {
$mg->removeFeed($command->command->args['feed']);
- } else {
+ } else if ($command->command_name == 'list') {
$mg->listAll();
+ } else {
+ $this->cliParser->commands['feed']->displayUsage(1);
}
}
);
$add->addArgument('feed', array('description' => 'URL of feed'));
+ $feed->addCommand(
+ 'list',
+ array(
+ 'description' => 'List all feeds',
+ )
+ );
+
$remove = $feed->addCommand(
'remove',
array(
echo '#' . $feedRow->f_id . ' ' . $feedRow->f_url . "\n";
++$items;
}
- $this->log->info('Finished pinging %d URLs.', $items);
+ $this->log->info('Finished listing %d URLs.', $items);
}
public function addFeed($url)