Merge pull request #2 from ornicar/master

Synchronize command with upstream
This commit is contained in:
Antoine Hérault 2011-06-23 23:28:33 -07:00
commit ecac97ce67

View File

@ -2,7 +2,7 @@
namespace Knplabs\Bundle\GaufretteBundle\Command; namespace Knplabs\Bundle\GaufretteBundle\Command;
use Symfony\Component\Console\Command\Command; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
@ -13,7 +13,7 @@ use Gaufrette\Glob;
* *
* @author Antoine Hérault <antoine.herault@gmail.com> * @author Antoine Hérault <antoine.herault@gmail.com>
*/ */
class FilesystemKeysCommand extends Command class FilesystemKeysCommand extends ContainerAwareCommand
{ {
/** /**
* {@inheritDoc} * {@inheritDoc}
@ -44,7 +44,7 @@ EOT
{ {
$filesystem = $input->getArgument('filesystem'); $filesystem = $input->getArgument('filesystem');
$glob = $input->getArgument('glob'); $glob = $input->getArgument('glob');
$container = $this->getApplication()->getKernel()->getContainer(); $container = $this->getContainer();
$serviceId = sprintf('gaufrette.%s_filesystem', $filesystem); $serviceId = sprintf('gaufrette.%s_filesystem', $filesystem);
if (!$container->has($serviceId)) { if (!$container->has($serviceId)) {