Exemplo n.º 1
0
<?php

include_once __DIR__ . '/../vendor/autoload.php';
use JLaso\Notify\Domain\Service\DI\Container;
use JLaso\Console as JLasoConsole;
$options = JLasoConsole\ArgumentsHelper::getInstance()->addHelpOption()->addOption("env", JLasoConsole\ConsoleOptionType::OPTIONAL(), "Environment", "dev")->setAlternatives(["dev", "prod"])->bind($help = true);
Container::setEnv($options['env']);
$container = Container::getInstance();
$repositories = ['user-repository'];
foreach ($repositories as $repository) {
    $container->get($repository)->initSchema();
}
Exemplo n.º 2
0
<?php

include_once __DIR__ . '/../vendor/autoload.php';
use JLaso\Console as JLasoConsole;
$options = JLasoConsole\ArgumentsHelper::getInstance()->addHelpOption()->addOption("verbose", JLasoConsole\ConsoleOptionType::NO_ARG(), "Verbosity")->addOption("env", JLasoConsole\ConsoleOptionType::OPTIONAL(), "Environment", "dev")->setAlternatives(array("dev", "prod"))->bind($help = true);
echo "The 'env' argument is " . $options['env'] . "\n";
echo isset($options['verbose']) ? "You have add 'verbose' argument\n" : "";
Exemplo n.º 3
0
 /**
  * @param ConsoleOptionType $type
  * @return bool
  */
 public function isEqual(ConsoleOptionType $type)
 {
     return $type->getValue() == $this->value;
 }