DoctrineProxyMatcher.php 367 B

12345678910111213141516171819202122
  1. <?php
  2. namespace DeepCopy\Matcher\Doctrine;
  3. use DeepCopy\Matcher\Matcher;
  4. use Doctrine\Common\Persistence\Proxy;
  5. /**
  6. * @final
  7. */
  8. class DoctrineProxyMatcher implements Matcher
  9. {
  10. /**
  11. * Matches a Doctrine Proxy class.
  12. *
  13. * {@inheritdoc}
  14. */
  15. public function matches($object, $property)
  16. {
  17. return $object instanceof Proxy;
  18. }
  19. }