Symfony\Bundle\FrameworkBundle\Controller\Controller::get PHP Method

get() protected method

Gets a container service by its id.
protected get ( string $id ) : object
$id string The service id
return object The service
    protected function get($id)
    {
        return $this->container->get($id);
    }

Usage Example

 public function __construct(Controller $controller, $parametres = null)
 {
     $this->controller = $controller;
     $this->securityContext = $controller->get('security.context');
     $this->pageweb = $controller->get('aetools.pageweb');
     if ($parametres === null) {
         $parametres = array();
     }
     $this->parametres = $parametres;
 }
All Usage Examples Of Symfony\Bundle\FrameworkBundle\Controller\Controller::get