Files
ezmigrationbundle/Command/AbstractCommand.php
T

29 lines
694 B
PHP

<?php
namespace Kaliop\eZMigrationBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
/**
* Base command class that all migration commands extend from.
*/
abstract class AbstractCommand extends ContainerAwareCommand
{
/**
* @var \Kaliop\eZMigrationBundle\Core\MigrationService
*/
private $migrationService;
/**
* @return \Kaliop\eZMigrationBundle\Core\MigrationService
*/
public function getMigrationService()
{
if (!$this->migrationService) {
$this->migrationService = $this->getContainer()->get('ez_migration_bundle.migration_service');
}
return $this->migrationService;
}
}