Overview

Namespaces

  • Evenement
  • None
  • PHP
  • Psr
    • Http
      • Message
  • Ratchet
    • Http
    • RFC6455
      • Handshake
      • Messaging
    • Server
    • Session
      • Serialize
      • Storage
        • Proxy
    • Wamp
    • WebSocket
  • React
    • EventLoop
      • Tick
      • Timer
    • Socket
    • Stream
  • Symfony
    • Component
      • HttpFoundation
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
      • Routing
        • Annotation
        • Exception
        • Generator
          • Dumper
        • Loader
          • DependencyInjection
        • Matcher
          • Dumper
        • Tests
          • Annotation
          • Fixtures
            • AnnotatedClasses
            • OtherAnnotatedClasses
          • Generator
            • Dumper
          • Loader
          • Matcher
            • Dumper

Classes

  • AnnotationClassLoader
  • AnnotationDirectoryLoader
  • AnnotationFileLoader
  • ClosureLoader
  • DirectoryLoader
  • ObjectRouteLoader
  • PhpFileLoader
  • RecursiveCallbackFilterIterator
  • XmlFileLoader
  • YamlFileLoader
  • Overview
  • Namespace
  • Class
  • Tree

Class XmlFileLoader

XmlFileLoader loads XML routing files.

Symfony\Component\Config\Loader\FileLoader
Extended by Symfony\Component\Routing\Loader\XmlFileLoader

Direct known subclasses

Symfony\Component\Routing\Tests\Fixtures\CustomXmlFileLoader
Namespace: Symfony\Component\Routing\Loader
Author: Fabien Potencier <fabien@symfony.com>
Author: Tobias Schultze <http://tobion.de>
Located at Loader/XmlFileLoader.php
Methods summary
public Symfony\Component\Routing\RouteCollection
# load( string $file, string|null $type = null )

Loads an XML file.

Loads an XML file.

Parameters

$file
string
$file An XML file path
$type
string|null
$type The resource type

Returns

Symfony\Component\Routing\RouteCollection
A RouteCollection instance

Throws

InvalidArgumentException
When the file cannot be loaded or when the XML cannot be parsed because it does not validate against the scheme.
protected
# parseNode( Symfony\Component\Routing\RouteCollection $collection, DOMElement $node, string $path, string $file )

Parses a node from a loaded XML file.

Parses a node from a loaded XML file.

Parameters

$collection
Symfony\Component\Routing\RouteCollection
$collection Collection to associate with the node
$node
DOMElement
$node Element to parse
$path
string
$path Full path of the XML file being processed
$file
string
$file Loaded file name

Throws

InvalidArgumentException
When the XML is invalid
public
# supports( mixed $resource, mixed $type = null )
protected
# parseRoute( Symfony\Component\Routing\RouteCollection $collection, DOMElement $node, string $path )

Parses a route and adds it to the RouteCollection.

Parses a route and adds it to the RouteCollection.

Parameters

$collection
Symfony\Component\Routing\RouteCollection
$collection RouteCollection instance
$node
DOMElement
$node Element to parse that represents a Route
$path
string
$path Full path of the XML file being processed

Throws

InvalidArgumentException
When the XML is invalid
protected
# parseImport( Symfony\Component\Routing\RouteCollection $collection, DOMElement $node, string $path, string $file )

Parses an import and adds the routes in the resource to the RouteCollection.

Parses an import and adds the routes in the resource to the RouteCollection.

Parameters

$collection
Symfony\Component\Routing\RouteCollection
$collection RouteCollection instance
$node
DOMElement
$node Element to parse that represents a Route
$path
string
$path Full path of the XML file being processed
$file
string
$file Loaded file name

Throws

InvalidArgumentException
When the XML is invalid
protected DOMDocument
# loadFile( string $file )

Loads an XML file.

Loads an XML file.

Parameters

$file
string
$file An XML file path

Returns

DOMDocument

Throws

InvalidArgumentException
When loading of XML file fails because of syntax errors or when the XML structure is not as expected by the scheme - see validate()
Constants summary
string NAMESPACE_URI 'http://symfony.com/schema/routing'
#
string SCHEME_PATH '/schema/routing/routing-1.0.xsd'
#
Ratchet API documentation generated by ApiGen 2.8.0