Exemplo n.º 1
0
<?php

/**
 * @file
 */
$application = (require __DIR__ . '/../bootstrap.php');
use Doctrine\DBAL\Tools\Console\ConsoleRunner;
$connection = $application['dbal_connection'];
$commands = [new \Doctrine\DBAL\Migrations\Tools\Console\Command\ExecuteCommand(), new \Doctrine\DBAL\Migrations\Tools\Console\Command\GenerateCommand(), new \Doctrine\DBAL\Migrations\Tools\Console\Command\MigrateCommand(), new \Doctrine\DBAL\Migrations\Tools\Console\Command\StatusCommand(), new \Doctrine\DBAL\Migrations\Tools\Console\Command\VersionCommand()];
$helperSet = ConsoleRunner::createHelperSet($connection);
$helperSet->set(new \Symfony\Component\Console\Helper\DialogHelper(), 'dialog');
return $helperSet;
Exemplo n.º 2
0
<?php

require_once __DIR__ . "/../vendor/autoload.php";
require_once __DIR__ . "/../app/resources/dependencyContainer.php";
use Doctrine\DBAL\Tools\Console\ConsoleRunner;
$connection = $deps["database"];
return ConsoleRunner::createHelperSet($connection);
<?php

use Doctrine\DBAL\Tools\Console\ConsoleRunner;
use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper;
use ImmutableStateStatusTracker\bootstrap;
require_once __DIR__ . '/bootstrap.php';
$entityManager = bootstrap::getEntityManager();
$helperSet = ConsoleRunner::createHelperSet($entityManager->getConnection());
$helperSet->set(new EntityManagerHelper($entityManager), 'em');
return $helperSet;