Documentation

AnnotationDirectoryLoader extends AnnotationFileLoader
in package

AnnotationDirectoryLoader loads routing information from annotations set on PHP classes and methods.

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

$loader  : mixed
__construct()  : mixed
load()  : RouteCollection
Loads from annotations from a directory.
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 directory.

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

A directory path

$type : string|null = null

The resource type

Tags
throws
InvalidArgumentException

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

Return values
RouteCollection

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