8000 [HttpKernel] [DX] Configurable controller layout by scaytrase · Pull Request #25422 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpKernel] [DX] Configurable controller layout #25422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply fabpot patch
  • Loading branch information
scaytrase committed Dec 10, 2017
commit a045a259bc3c1ba031aed3b95df5dd515ef965ca
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Symfony\Component\HttpKernel\Bundle\BundleInterface;

/**
* Class for holding bundle + controller name + action name
* Class for holding bundle + controller name + action name.
*
* @author Pavel Batanov <pavel@batanov.me>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

/**
* Responsible for build FQCN::action from bundle + controller name + action name
* and parse FQCN::action into bundle + controller name + action name
* and parse FQCN::action into bundle + controller name + action name.
*
* @author Pavel Batanov <pavel@batanov.me>
*/
interface ControllerLayoutInterface
{
/**
* Decompose controller string into bundle, controller and action
* Decompose controller string into bundle, controller and action.
*
* @param string $controller
*
Expand All @@ -33,7 +33,7 @@ interface ControllerLayoutInterface
public function parse(string $controller): ActionReference;

/**
* Builds a controller string for given bundle, controller, and action
* Builds a controller string for given bundle, controller, and action.
*
* @param ActionReference $action
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Symfony\Component\HttpKernel\KernelInterface;

/**
* Class for generic *Bundle/Controller/*Controller::*Action layout
* Class for generic *Bundle/Controller/*Controller::*Action layout.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Pavel Batanov <pavel@batanov.me>
Expand All @@ -31,6 +31,7 @@ final class GenericControllerLayout implements ControllerLayoutInterface

/**
* GenericControllerLayout constructor.
*
* @param KernelInterface $kernel
*/
public function __construct(KernelInterface $kernel)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
class ControllerLayoutException extends \InvalidArgumentException
{
public static function unknownControllerClass(ActionReference $reference, string $try): ControllerLayoutException
public static function unknownControllerClass(ActionReference $reference, string $try): self
{
throw new static(
sprintf(
Expand All @@ -31,7 +31,7 @@ public static function unknownControllerClass(ActionReference $reference, string
);
}

public static function unknownBundleForController(string $controller): ControllerLayoutException
public static function unknownBundleForController(string $controller): self
{
return new static(sprintf('Unable to find a bundle that defines controller "%s".', $controller));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ final class AlternativeBundleNameProvider

/**
* AlternativeBundleNameProvider constructor.
*
* @param KernelInterface $kernel
*/
public function __construct(KernelInterface $kernel)
Expand Down
0