ClassDiscriminatorResolverInterface.php 807 B

1234567891011121314151617181920212223242526272829303132
  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\Serializer\Mapping;
  11. /**
  12. * Knows how to get the class discriminator mapping for classes and objects.
  13. *
  14. * @author Samuel Roze <samuel.roze@gmail.com>
  15. */
  16. interface ClassDiscriminatorResolverInterface
  17. {
  18. public function getMappingForClass(string $class): ?ClassDiscriminatorMapping;
  19. /**
  20. * @param object|string $object
  21. */
  22. public function getMappingForMappedObject($object): ?ClassDiscriminatorMapping;
  23. /**
  24. * @param object|string $object
  25. */
  26. public function getTypeForMappedObject($object): ?string;
  27. }