PHP Class Symfony\Component\Routing\Loader\XmlFileLoader

Author: Fabien Potencier ([email protected])
Inheritance: extends Symfony\Component\Config\Loader\FileLoader
Show file Open project: pmjones/php-framework-benchmarks Class Usage Examples

Public Methods

Method Description
load ( string $file ) : RouteCollection Loads an XML file.
load ( string $file, string $type = null ) : RouteCollection Loads an XML file.
supports ( mixed $resource ) : boolean Returns true if this class supports the given resource.
supports ( mixed $resource, string $type = null ) : boolean Returns true if this class supports the given resource.

Protected Methods

Method Description
getXmlErrors ( )
loadFile ( $path )
loadFile ( string $file ) : DOMDocument Loads an XML file.
parseNode ( RouteCollection $collection, DOMElement $node, string $path, string $file ) Parses a node from a loaded XML file.
parseRoute ( RouteCollection $collection, $definition, $file )
parseRoute ( RouteCollection $collection, DOMElement $definition, string $file ) Parses a route and adds it to the RouteCollection.
validate ( DOMDocument $dom ) Validates a loaded XML file.
validate ( DOMDocument $dom, $file )

Private Methods

Method Description
getXmlErrors ( ) : array Retrieves libxml errors and clears them.

Method Details

getXmlErrors() protected method

protected getXmlErrors ( )

load() public method

Loads an XML file.
public load ( string $file ) : RouteCollection
$file string A XML file path
return Symfony\Component\Routing\RouteCollection A RouteCollection instance

load() public method

Loads an XML file.
public load ( string $file, string $type = null ) : RouteCollection
$file string An XML file path
$type string The resource type
return Symfony\Component\Routing\RouteCollection A RouteCollection instance

loadFile() protected method

protected loadFile ( $path )

loadFile() protected method

Loads an XML file.
protected loadFile ( string $file ) : DOMDocument
$file string An XML file path
return DOMDocument

parseNode() protected method

Parses a node from a loaded XML file.
protected parseNode ( RouteCollection $collection, DOMElement $node, string $path, string $file )
$collection Symfony\Component\Routing\RouteCollection the collection to associate with the node
$node DOMElement the node to parse
$path string the path of the XML file being processed
$file string

parseRoute() protected method

protected parseRoute ( RouteCollection $collection, $definition, $file )
$collection Symfony\Component\Routing\RouteCollection

parseRoute() protected method

Parses a route and adds it to the RouteCollection.
protected parseRoute ( RouteCollection $collection, DOMElement $definition, string $file )
$collection Symfony\Component\Routing\RouteCollection A RouteCollection instance
$definition DOMElement Route definition
$file string An XML file path

supports() public method

Returns true if this class supports the given resource.
public supports ( mixed $resource ) : boolean
$resource mixed A resource
return boolean true if this class supports the given resource, false otherwise

supports() public method

Returns true if this class supports the given resource.
public supports ( mixed $resource, string $type = null ) : boolean
$resource mixed A resource
$type string The resource type
return boolean True if this class supports the given resource, false otherwise

validate() protected method

Validates a loaded XML file.
protected validate ( DOMDocument $dom )
$dom DOMDocument A loaded XML file

validate() protected method

protected validate ( DOMDocument $dom, $file )
$dom DOMDocument