Skip to content
Browse files

fix jackrabbit command

  • Loading branch information...
1 parent 526483e commit 25a9c06df2b00374c5110f43f468fa1534f77c9d @lsmith77 lsmith77 committed Mar 1, 2012
Showing with 30 additions and 2 deletions.
  1. +30 −2 OptionalCommand/JackrabbitCommand.php
View
32 OptionalCommand/JackrabbitCommand.php
@@ -26,15 +26,43 @@
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\DependencyInjection\ContainerAwareInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
+use Jackalope\Tools\Console\Command\JackrabbitCommand as BaseJackrabbitCommand;
+use Doctrine\Bundle\PHPCRBundle\Command\DoctrineCommandHelper;
/**
* @author Daniel Barsotti <daniel.barsotti@liip.ch>
*/
-class JackrabbitCommand extends ContainerAwareCommand
+class JackrabbitCommand extends BaseJackrabbitCommand implements ContainerAwareInterface
{
/**
+ * @var ContainerInterface
+ */
+ private $container;
+
+ /**
+ * @return ContainerInterface
+ */
+ protected function getContainer()
+ {
+ if (null === $this->container) {
+ $this->container = $this->getApplication()->getKernel()->getContainer();
+ }
+
+ return $this->container;
+ }
+
+ /**
+ * @see ContainerAwareInterface::setContainer()
+ */
+ public function setContainer(ContainerInterface $container = null)
+ {
+ $this->container = $container;
+ }
+
+ /**
* Configures the current command.
*/
protected function configure()

0 comments on commit 25a9c06

Please sign in to comment.
Something went wrong with that request. Please try again.