FileAccess Orion

ControllerNameParser
in package

ControllerNameParser converts controller from the short notation a:b:c (BlogBundle:Post:index) to a fully-qualified class::method string (Bundle\BlogBundle\Controller\PostController::indexAction).

Tags
author

Fabien Potencier fabien@symfony.com

deprecated

since Symfony 4.1

Table of Contents

$kernel  : mixed
__construct()  : mixed
build()  : string
Converts a class::method notation to a short one (a:b:c).
parse()  : string
Converts a short notation a:b:c to a class::method.
findAlternative()  : string|null
Attempts to find a bundle that is *similar* to the given bundle name.

Properties

Methods

build()

Converts a class::method notation to a short one (a:b:c).

public build(string $controller) : string
Parameters
$controller : string

A string in the class::method notation

Tags
throws
InvalidArgumentException

when the controller is not valid or cannot be found in any bundle

Return values
string

A short notation controller (a:b:c)

parse()

Converts a short notation a:b:c to a class::method.

public parse(string $controller) : string
Parameters
$controller : string

A short notation controller (a:b:c)

Tags
throws
InvalidArgumentException

when the specified bundle is not enabled or the controller cannot be found

Return values
string

A string in the class::method notation

findAlternative()

Attempts to find a bundle that is *similar* to the given bundle name.

private findAlternative(string $nonExistentBundleName) : string|null
Parameters
$nonExistentBundleName : string
Return values
string|null

Search results