You are here

public function FilterControllerEvent::setController in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Event/FilterControllerEvent.php \Symfony\Component\HttpKernel\Event\FilterControllerEvent::setController()

Sets a new controller.

Parameters

callable $controller:

Throws

\LogicException

1 call to FilterControllerEvent::setController()
FilterControllerEvent::__construct in vendor/symfony/http-kernel/Event/FilterControllerEvent.php

File

vendor/symfony/http-kernel/Event/FilterControllerEvent.php, line 59

Class

FilterControllerEvent
Allows filtering of a controller callable.

Namespace

Symfony\Component\HttpKernel\Event

Code

public function setController($controller) {

  // controller must be a callable
  if (!is_callable($controller)) {
    throw new \LogicException(sprintf('The controller must be a callable (%s given).', $this
      ->varToString($controller)));
  }
  $this->controller = $controller;
}