MapDateTime.php 766 B

1234567891011121314151617181920212223242526272829
  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\HttpKernel\Attribute;
  11. use Symfony\Component\HttpKernel\Controller\ArgumentResolver\DateTimeValueResolver;
  12. /**
  13. * Controller parameter tag to configure DateTime arguments.
  14. */
  15. #[\Attribute(\Attribute::TARGET_PARAMETER)]
  16. class MapDateTime extends ValueResolver
  17. {
  18. public function __construct(
  19. public readonly ?string $format = null,
  20. bool $disabled = false,
  21. string $resolver = DateTimeValueResolver::class,
  22. ) {
  23. parent::__construct($resolver, $disabled);
  24. }
  25. }