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 YamlFileLoader

YamlFileLoader loads Yaml routing files.

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

Loads a Yaml file.

Loads a Yaml file.

Parameters

$file
string
$file A Yaml file path
$type
string|null
$type The resource type

Returns

Symfony\Component\Routing\RouteCollection
A RouteCollection instance

Throws

InvalidArgumentException
When a route can't be parsed because YAML is invalid
public
# supports( mixed $resource, mixed $type = null )
protected
# parseRoute( Symfony\Component\Routing\RouteCollection $collection, string $name, array $config, 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 A RouteCollection instance
$name
string
$name Route name
$config
array
$config Route definition
$path
string
$path Full path of the YAML file being processed
protected
# parseImport( Symfony\Component\Routing\RouteCollection $collection, array $config, 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 A RouteCollection instance
$config
array
$config Route definition
$path
string
$path Full path of the YAML file being processed
$file
string
$file Loaded file name
protected
# validate( array $config, string $name, string $path )

Validates the route configuration.

Validates the route configuration.

Parameters

$config
array
$config A resource config
$name
string
$name The config key
$path
string
$path The loaded file path

Throws

InvalidArgumentException
If one of the provided config keys is not supported, something is missing or the combination is nonsense
Ratchet API documentation generated by ApiGen 2.8.0