Documentation

AnnotationFileLoader extends FileLoader
in package

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

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

$loader  : mixed
__construct()  : mixed
load()  : RouteCollection|null
Loads from annotations from a file.
supports()  : mixed
{@inheritdoc}
findClass()  : string|false
Returns the full class name for the first class in the file.

Properties

Methods

load()

Loads from annotations from a file.

public load(string $file[, string|null $type = null ]) : RouteCollection|null
Parameters
$file : string

A PHP file path

$type : string|null = null

The resource type

Tags
throws
InvalidArgumentException

When the file does not exist or its routes cannot be parsed

Return values
RouteCollection|null

A RouteCollection instance

supports()

{@inheritdoc}

public supports(mixed $resource[, mixed $type = null ]) : mixed
Parameters
$resource : mixed
$type : mixed = null
Return values
mixed

findClass()

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

protected findClass(string $file) : string|false
Parameters
$file : string

A PHP file path

Return values
string|false

Full class name if found, false otherwise

Search results