PHP Class Symfony\Component\Validator\Mapping\Loader\XmlFileLoader

Inheritance: extends Symfony\Component\Validator\Mapping\Loader\FileLoader
Show file Open project: symfony/symfony Class Usage Examples

Protected Properties

Property Type Description
$classes SimpleXMLElement[] | null The XML nodes of the mapping file.

Public Methods

Method Description
getMappedClasses ( ) : string[] Return the names of the classes mapped in this file.
loadClassMetadata ( Symfony\Component\Validator\Mapping\ClassMetadata $metadata )

Protected Methods

Method Description
parseConstraints ( SimpleXMLElement $nodes ) : array Parses a collection of "constraint" XML nodes.
parseFile ( string $path ) : SimpleXMLElement Loads the XML class descriptions from the given file.
parseOptions ( SimpleXMLElement $nodes ) : array Parses a collection of "option" XML nodes.
parseValues ( SimpleXMLElement $nodes ) : array Parses a collection of "value" XML nodes.

Private Methods

Method Description
loadClassMetadataFromXml ( Symfony\Component\Validator\Mapping\ClassMetadata $metadata, SimpleXMLElement $classDescription )
loadClassesFromXml ( )

Method Details

getMappedClasses() public method

Return the names of the classes mapped in this file.
public getMappedClasses ( ) : string[]
return string[] The classes names

loadClassMetadata() public method

public loadClassMetadata ( Symfony\Component\Validator\Mapping\ClassMetadata $metadata )
$metadata Symfony\Component\Validator\Mapping\ClassMetadata

parseConstraints() protected method

Parses a collection of "constraint" XML nodes.
protected parseConstraints ( SimpleXMLElement $nodes ) : array
$nodes SimpleXMLElement The XML nodes
return array The Constraint instances

parseFile() protected method

Loads the XML class descriptions from the given file.
protected parseFile ( string $path ) : SimpleXMLElement
$path string The path of the XML file
return SimpleXMLElement The class descriptions

parseOptions() protected method

Parses a collection of "option" XML nodes.
protected parseOptions ( SimpleXMLElement $nodes ) : array
$nodes SimpleXMLElement The XML nodes
return array The options

parseValues() protected method

Parses a collection of "value" XML nodes.
protected parseValues ( SimpleXMLElement $nodes ) : array
$nodes SimpleXMLElement The XML nodes
return array The values

Property Details

$classes protected property

The XML nodes of the mapping file.
protected SimpleXMLElement[]|null $classes
return SimpleXMLElement[] | null