/**
  *
  * Init backend class and storage API
  *
  * @param Request $request
  */
 public function preExecute(Request $request)
 {
     parent::preExecute($request);
     $logProcessor = $this->container->get('syrup.monolog.syslog_processor');
     $logProcessor->setRunId($this->storageApi->getRunId());
     // Init backend class
     $backend = $request->get("backend");
     switch ($backend) {
         case 'mysql':
             $className = "\\Keboola\\ProvisioningBundle\\Provisioning\\Manager\\Servers\\Database\\Mysql";
             break;
         case 'wrdb':
             $className = "\\Keboola\\ProvisioningBundle\\Provisioning\\Manager\\Servers\\Database\\Wrdb";
             break;
         case 'redshift':
             $className = "\\Keboola\\ProvisioningBundle\\Provisioning\\Manager\\Servers\\Database\\Redshift";
             break;
         case 'redshift-workspace':
             $className = "\\Keboola\\ProvisioningBundle\\Provisioning\\Manager\\Servers\\Workspace\\Redshift";
             break;
         case 'snowflake':
             $className = "\\Keboola\\ProvisioningBundle\\Provisioning\\Manager\\Servers\\Workspace\\Snowflake";
             break;
         case 'docker':
             $className = "\\Keboola\\ProvisioningBundle\\Provisioning\\Manager\\Servers\\Docker";
             break;
         default:
             throw new UserException("Class '{$backend}' not found. Possible typo in URL?");
             break;
     }
     $doctrine = $this->container->get("doctrine");
     $this->server = new $className($doctrine, $this->storageApi);
     // Verify token of the user
     $this->tokenInfo = $this->storageApi->verifyToken();
 }
 /**
  *
  * Init backend class and storage API
  *
  * @param Request $request
  */
 public function preExecute(Request $request)
 {
     parent::preExecute($request);
     $this->factory = $this->container->get('provisioning_bundle.server_factory');
     // Verify token of the user
     $this->tokenInfo = $this->storageApi->verifyToken();
 }
 /**
  * Controller init
  */
 public function preExecute(Request $request)
 {
     parent::preExecute($request);
     $this->logger = $this->container->get("logger");
     /**
      * @var DebugSyslogHandler $handlerForDebug
      */
     $handlerForDebug = $this->container->get('monolog.handler.orchestratorbundle.syslog_handler');
     $handlerForDebug->setFormatter($this->container->get('syrup.monolog.formatter'));
     $this->logger->pushHandler($handlerForDebug);
 }
 /**
  * @param Request $request
  */
 public function preExecute(Request $request)
 {
     parent::preExecute($request);
     if ($request->get("driver")) {
         $this->checkDriver($request->get("driver"));
         $component = $this->getParameter("app_name") . '-' . $request->get("driver");
         $this->checkComponent($component);
         $this->componentName = $component;
         $this->driver = $request->get("driver");
     }
 }
 public function preExecute(Request $request)
 {
     parent::preExecute($request);
     $this->configuration = $this->container->get('wr_google_drive.configuration');
     $this->configuration->setStorageApi($this->storageApi);
 }