Skip to content

Instantly share code, notes, and snippets.

@JoshuaEstes
Last active October 9, 2015 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoshuaEstes/2d2ad13347e24e0d9e6f to your computer and use it in GitHub Desktop.
Save JoshuaEstes/2d2ad13347e24e0d9e6f to your computer and use it in GitHub Desktop.
Symfony2 Validator Component
<?php
namespace Acme\TutorialBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Validator\Validation;
use Symfony\Component\Validator\Constraints as Assert;
class TestCommand extends ContainerAwareCommand
{
protected function configure()
{
$this->setName('acme:test');
}
protected function interact(InputInterface $input, OutputInterface $output)
{
}
protected function getDialogHelper()
{
return $this->getHelperSet()->get('dialog');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment