ProxyDefinition.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace Doctrine\Common\Proxy;
  3. use ReflectionProperty;
  4. /**
  5. * Definition structure how to create a proxy.
  6. */
  7. class ProxyDefinition
  8. {
  9. /** @var string */
  10. public $proxyClassName;
  11. /** @var array<string> */
  12. public $identifierFields;
  13. /** @var ReflectionProperty[] */
  14. public $reflectionFields;
  15. /** @var callable */
  16. public $initializer;
  17. /** @var callable */
  18. public $cloner;
  19. /**
  20. * @param string $proxyClassName
  21. * @param array<string> $identifierFields
  22. * @param array<string, ReflectionProperty> $reflectionFields
  23. * @param callable $initializer
  24. * @param callable $cloner
  25. */
  26. public function __construct($proxyClassName, array $identifierFields, array $reflectionFields, $initializer, $cloner)
  27. {
  28. $this->proxyClassName = $proxyClassName;
  29. $this->identifierFields = $identifierFields;
  30. $this->reflectionFields = $reflectionFields;
  31. $this->initializer = $initializer;
  32. $this->cloner = $cloner;
  33. }
  34. }