Command.php 730 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /*
  3. * This file is part of Composer.
  4. *
  5. * (c) Nils Adermann <naderman@naderman.de>
  6. * Jordi Boggiano <j.boggiano@seld.be>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Composer\Command;
  12. use Symfony\Component\Console\Command\Command as BaseCommand;
  13. /**
  14. * Base class for Composer commands
  15. *
  16. * @author Ryan Weaver <ryan@knplabs.com>
  17. * @author Konstantin Kudryashov <ever.zet@gmail.com>
  18. */
  19. abstract class Command extends BaseCommand
  20. {
  21. /**
  22. * @return \Composer\Composer
  23. */
  24. protected function getComposer($required = true)
  25. {
  26. return $this->getApplication()->getComposer($required);
  27. }
  28. }