DescriptorHelper.php 914 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Form\Console\Helper;
  11. use Symfony\Component\Console\Helper\DescriptorHelper as BaseDescriptorHelper;
  12. use Symfony\Component\Form\Console\Descriptor\JsonDescriptor;
  13. use Symfony\Component\Form\Console\Descriptor\TextDescriptor;
  14. use Symfony\Component\HttpKernel\Debug\FileLinkFormatter;
  15. /**
  16. * @author Yonel Ceruto <yonelceruto@gmail.com>
  17. *
  18. * @internal
  19. */
  20. class DescriptorHelper extends BaseDescriptorHelper
  21. {
  22. public function __construct(FileLinkFormatter $fileLinkFormatter = null)
  23. {
  24. $this
  25. ->register('txt', new TextDescriptor($fileLinkFormatter))
  26. ->register('json', new JsonDescriptor())
  27. ;
  28. }
  29. }