Deprecated: Return type of Google\Model::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Model.php on line 256

Deprecated: Return type of Google\Model::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Model.php on line 261

Deprecated: Return type of Google\Model::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Model.php on line 268

Deprecated: Return type of Google\Model::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Model.php on line 278

Deprecated: Return type of Google\Collection::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 22

Deprecated: Return type of Google\Collection::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 38

Deprecated: Return type of Google\Collection::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 30

Deprecated: Return type of Google\Collection::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 43

Deprecated: Return type of Google\Collection::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 14

Deprecated: Return type of Google\Collection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 49
Symfony Profiler

vendor/symfony/form/Extension/Validator/Type/UploadValidatorExtension.php line 24

Open in your IDE?
  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\Extension\Validator\Type;
  11. use Symfony\Component\Form\AbstractTypeExtension;
  12. use Symfony\Component\Form\Extension\Core\Type\FormType;
  13. use Symfony\Component\OptionsResolver\Options;
  14. use Symfony\Component\OptionsResolver\OptionsResolver;
  15. use Symfony\Contracts\Translation\TranslatorInterface;
  16. /**
  17.  * @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
  18.  * @author David Badura <d.a.badura@gmail.com>
  19.  */
  20. class UploadValidatorExtension extends AbstractTypeExtension
  21. {
  22.     private $translator;
  23.     private $translationDomain;
  24.     public function __construct(TranslatorInterface $translatorstring $translationDomain null)
  25.     {
  26.         $this->translator $translator;
  27.         $this->translationDomain $translationDomain;
  28.     }
  29.     /**
  30.      * {@inheritdoc}
  31.      */
  32.     public function configureOptions(OptionsResolver $resolver)
  33.     {
  34.         $translator $this->translator;
  35.         $translationDomain $this->translationDomain;
  36.         $resolver->setNormalizer('upload_max_size_message', function (Options $options$message) use ($translator$translationDomain) {
  37.             return function () use ($translator$translationDomain$message) {
  38.                 return $translator->trans($message(), [], $translationDomain);
  39.             };
  40.         });
  41.     }
  42.     /**
  43.      * {@inheritdoc}
  44.      */
  45.     public static function getExtendedTypes(): iterable
  46.     {
  47.         return [FormType::class];
  48.     }
  49. }