NullDumper.php 1011 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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\LazyProxy\PhpDumper;
  11. use Symfony\Component\DependencyInjection\Definition;
  12. /**
  13. * Null dumper, negates any proxy code generation for any given service definition.
  14. *
  15. * @author Marco Pivetta <ocramius@gmail.com>
  16. *
  17. * @final
  18. */
  19. class NullDumper implements DumperInterface
  20. {
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public function isProxyCandidate(Definition $definition): bool
  25. {
  26. return false;
  27. }
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public function getProxyFactoryCode(Definition $definition, string $id, string $factoryCode): string
  32. {
  33. return '';
  34. }
  35. /**
  36. * {@inheritdoc}
  37. */
  38. public function getProxyCode(Definition $definition): string
  39. {
  40. return '';
  41. }
  42. }