vendor/symfony/framework-bundle/Controller/Controller.php line 17

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony package.
  4.  *
  5.  * (c) Fabien Potencier <fabien@symfony.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace Symfony\Bundle\FrameworkBundle\Controller;
  11. use Symfony\Component\DependencyInjection\ContainerAwareInterface;
  12. use Symfony\Component\DependencyInjection\ContainerAwareTrait;
  13. @trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.2, use %s instead.'Controller::class, AbstractController::class), E_USER_DEPRECATED);
  14. /**
  15.  * Controller is a simple implementation of a Controller.
  16.  *
  17.  * It provides methods to common features needed in controllers.
  18.  *
  19.  * @deprecated since Symfony 4.2, use {@see AbstractController} instead.
  20.  *
  21.  * @author Fabien Potencier <fabien@symfony.com>
  22.  */
  23. abstract class Controller implements ContainerAwareInterface
  24. {
  25.     use ContainerAwareTrait;
  26.     use ControllerTrait;
  27.     /**
  28.      * Gets a container configuration parameter by its name.
  29.      *
  30.      * @return mixed
  31.      *
  32.      * @final
  33.      */
  34.     protected function getParameter(string $name)
  35.     {
  36.         return $this->container->getParameter($name);
  37.     }
  38. }