You are here

public function ClassMetadataFactory::hasMetadataFor in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/symfony/serializer/Mapping/Factory/ClassMetadataFactory.php \Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory::hasMetadataFor()
  2. 8.0 vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php \Doctrine\Common\Persistence\Mapping\ClassMetadataFactory::hasMetadataFor()
Same name and namespace in other branches
  1. 8 vendor/symfony/serializer/Mapping/Factory/ClassMetadataFactory.php \Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory::hasMetadataFor()

Checks if class has metadata.

Parameters

mixed $value:

Return value

bool

Overrides ClassMetadataFactoryInterface::hasMetadataFor

File

vendor/symfony/serializer/Mapping/Factory/ClassMetadataFactory.php, line 96

Class

ClassMetadataFactory
Returns a {@link ClassMetadata}.

Namespace

Symfony\Component\Serializer\Mapping\Factory

Code

public function hasMetadataFor($value) {
  $class = $this
    ->getClass($value);
  return class_exists($class) || interface_exists($class);
}