property_access.php 1.1 KB

12345678910111213141516171819202122232425262728293031
  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\DependencyInjection\Loader\Configurator;
  11. use Symfony\Component\PropertyAccess\PropertyAccessor;
  12. use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
  13. return static function (ContainerConfigurator $container) {
  14. $container->services()
  15. ->set('property_accessor', PropertyAccessor::class)
  16. ->args([
  17. abstract_arg('magic methods allowed, set by the extension'),
  18. abstract_arg('throwExceptionOnInvalidIndex, set by the extension'),
  19. service('cache.property_access')->ignoreOnInvalid(),
  20. abstract_arg('throwExceptionOnInvalidPropertyPath, set by the extension'),
  21. abstract_arg('propertyReadInfoExtractor, set by the extension'),
  22. abstract_arg('propertyWriteInfoExtractor, set by the extension'),
  23. ])
  24. ->alias(PropertyAccessorInterface::class, 'property_accessor')
  25. ;
  26. };