-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove duplicate command (keep container aware version : support 2.3+)
- Loading branch information
1 parent
f707d66
commit 8f08b6b
Showing
5 changed files
with
7 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,29 +2,25 @@ | |
namespace Laposte\DatanovaBundle\Command; | ||
|
||
use Laposte\DatanovaBundle\Service\Downloader; | ||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | ||
use Symfony\Component\Console\Input\InputArgument; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Input\InputOption; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* Symfony 2.3+ DownloadDatasetCommand | ||
* | ||
* @author Florian Ajir <[email protected]> | ||
*/ | ||
class DownloadDatasetCommand extends Command | ||
class DownloadDatasetCommand extends ContainerAwareCommand | ||
{ | ||
/** @var Downloader $downloader */ | ||
private $downloader; | ||
|
||
/** | ||
* @param Downloader $downloader | ||
* Command configuration | ||
*/ | ||
public function __construct(Downloader $downloader) | ||
{ | ||
$this->downloader = $downloader; | ||
parent::__construct(); | ||
} | ||
|
||
protected function configure() | ||
{ | ||
$this | ||
|
@@ -59,6 +55,7 @@ protected function configure() | |
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$this->downloader = $this->getContainer()->get('data_nova.service.downloader'); | ||
$dataset = $input->getArgument('dataset'); | ||
$format = strtolower($input->getArgument('format')); | ||
$query = $input->getArgument('q'); | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters