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 AnnotationFileLoader

AnnotationFileLoader loads routing information from annotations set on a PHP class and its methods.

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

Direct known subclasses

Symfony\Component\Routing\Loader\AnnotationDirectoryLoader
Namespace: Symfony\Component\Routing\Loader
Author: Fabien Potencier <fabien@symfony.com>
Located at Loader/AnnotationFileLoader.php
Methods summary
public
# __construct( Symfony\Component\Config\FileLocatorInterface $locator, Symfony\Component\Routing\Loader\AnnotationClassLoader $loader )

Constructor.

Constructor.

Parameters

$locator
Symfony\Component\Config\FileLocatorInterface
$locator A FileLocator instance
$loader
Symfony\Component\Routing\Loader\AnnotationClassLoader
$loader An AnnotationClassLoader instance

Throws

RuntimeException
public Symfony\Component\Routing\RouteCollection
# load( string $file, string|null $type = null )

Loads from annotations from a file.

Loads from annotations from a file.

Parameters

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

Returns

Symfony\Component\Routing\RouteCollection
A RouteCollection instance

Throws

InvalidArgumentException
When the file does not exist or its routes cannot be parsed
public
# supports( mixed $resource, mixed $type = null )
protected string|false
# findClass( string $file )

Returns the full class name for the first class in the file.

Returns the full class name for the first class in the file.

Parameters

$file
string
$file A PHP file path

Returns

string|false
Full class name if found, false otherwise
Properties summary
protected mixed $loader
#
Ratchet API documentation generated by ApiGen 2.8.0