Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\Serializer\Mapping\Factory; Chris@0: Chris@0: use Symfony\Component\Serializer\Exception\InvalidArgumentException; Chris@0: use Symfony\Component\Serializer\Mapping\ClassMetadataInterface; Chris@0: Chris@0: /** Chris@0: * Returns a {@see ClassMetadataInterface}. Chris@0: * Chris@0: * @author Kévin Dunglas Chris@0: */ Chris@0: interface ClassMetadataFactoryInterface Chris@0: { Chris@0: /** Chris@0: * If the method was called with the same class name (or an object of that Chris@0: * class) before, the same metadata instance is returned. Chris@0: * Chris@0: * If the factory was configured with a cache, this method will first look Chris@0: * for an existing metadata instance in the cache. If an existing instance Chris@0: * is found, it will be returned without further ado. Chris@0: * Chris@0: * Otherwise, a new metadata instance is created. If the factory was Chris@0: * configured with a loader, the metadata is passed to the Chris@0: * {@link \Symfony\Component\Serializer\Mapping\Loader\LoaderInterface::loadClassMetadata()} method for further Chris@0: * configuration. At last, the new object is returned. Chris@0: * Chris@0: * @param string|object $value Chris@0: * Chris@0: * @return ClassMetadataInterface Chris@0: * Chris@0: * @throws InvalidArgumentException Chris@0: */ Chris@0: public function getMetadataFor($value); Chris@0: Chris@0: /** Chris@0: * Checks if class has metadata. Chris@0: * Chris@0: * @param mixed $value Chris@0: * Chris@0: * @return bool Chris@0: */ Chris@0: public function hasMetadataFor($value); Chris@0: }