Symfony2 API
Class

Symfony\Component\Validator\Mapping\ClassMetadataFactory

class ClassMetadataFactory implements MetadataFactoryInterface

A factory for creating metadata for PHP classes.

Methods

__construct(LoaderInterface $loader = null, CacheInterface $cache = null)

MetadataInterface getMetadataFor(mixed $value)

Returns the metadata for the given value.

Boolean hasMetadataFor(mixed $value)

Returns whether metadata exists for the given value.

Details

at line 40
public __construct(LoaderInterface $loader = null, CacheInterface $cache = null)

Parameters

LoaderInterface $loader
CacheInterface $cache

at line 49
public MetadataInterface getMetadataFor(mixed $value)

Returns the metadata for the given value.

Parameters

mixed $value Some value.

Return Value

MetadataInterface The metadata for the value.

Exceptions

NoSuchMetadataException If no metadata exists for the value.

at line 98
public Boolean hasMetadataFor(mixed $value)

Returns whether metadata exists for the given value.

Parameters

mixed $value Some value.

Return Value

Boolean Whether metadata exists for the value.