Skip to content

Instantly share code, notes, and snippets.

@cbergau
Last active December 20, 2017 22:07
Show Gist options
  • Select an option

  • Save cbergau/ce8d485e5fe49cac57f7edafd17892b7 to your computer and use it in GitHub Desktop.

Select an option

Save cbergau/ce8d485e5fe49cac57f7edafd17892b7 to your computer and use it in GitHub Desktop.
<?php
require_once './vendor/autoload.php';
class Test extends \Symfony\Component\Console\Command\Command
{
protected function configure()
{
$this->setName('test')->addArgument('myarg', \Symfony\Component\Console\Input\InputArgument::REQUIRED);
}
protected function execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output)
{
var_dump($input);
}
}
$app = new \Symfony\Component\Console\Application();
$app->add(new Test());
$app->run();
@cbergau
Copy link
Author

cbergau commented Dec 20, 2017

test a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment