Drupal investigation

DumperInterface.php 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. * Lazy proxy dumper capable of generating the instantiation logic PHP code for proxied services.
  14. *
  15. * @author Marco Pivetta <ocramius@gmail.com>
  16. */
  17. interface DumperInterface
  18. {
  19. /**
  20. * Inspects whether the given definitions should produce proxy instantiation logic in the dumped container.
  21. *
  22. * @param Definition $definition
  23. *
  24. * @return bool
  25. */
  26. public function isProxyCandidate(Definition $definition);
  27. /**
  28. * Generates the code to be used to instantiate a proxy in the dumped factory code.
  29. *
  30. * @param Definition $definition
  31. * @param string $id service identifier
  32. *
  33. * @return string
  34. */
  35. public function getProxyFactoryCode(Definition $definition, $id);
  36. /**
  37. * Generates the code for the lazy proxy.
  38. *
  39. * @param Definition $definition
  40. *
  41. * @return string
  42. */
  43. public function getProxyCode(Definition $definition);
  44. }