getVhostManager.

@param InputInterface  $input
@param OutputInterface $output
@param string          $vhost

@return VhostManager
161677
protected function getVhostManager(InputInterface $input, OutputInterface $output, $vhost)
    {
        $credentials = $this->getCredentials($input, $output);

        $logger = new CliLogger($output);
        $httpClient = new CurlClient($credentials['host'], $credentials['port'], $credentials['user'], $credentials['password']);
        $action = new RealAction($httpClient);
        $action->setLogger($logger);

        $credentials['vhost'] = $vhost;
        $vhostManager = new VhostManager($credentials, $action, $httpClient);

        $vhostManager->setLogger($logger);

        return $vhostManager;
    }
373543
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $channels = $input->getOption('channel');
        $maxRuntime = (int)$input->getOption('max-runtime');
        $id = $input->getOption('id');

        $container = $this->getContainer();
        $servers = $container->getParameter('gdbots_pbjx.transport.gearman.servers');
        $timeout = (int)$container->getParameter('gdbots_pbjx.transport.gearman.timeout');
        $prefix = $container->getParameter('gdbots_pbjx.transport.gearman.channel_prefix');
        $instanceId = $container->getParameter('cloud_instance_id');
        $workerId = $id ? sprintf('%s-%s%s', $instanceId, $prefix, $id) : null;

        if (!empty($prefix)) {
            $channels = array_map(function ($channel) use ($prefix) {
                return $prefix . $channel;
            }, $channels);
        }

        $this->createConsoleRequest();
        $consumer = new GearmanConsumer(
            $this->getPbjxServiceLocator(), $workerId, $channels, $servers, $timeout, $this->getLogger()
        );
        $consumer->run($maxRuntime);
    }
694746
public function withHost($host)
    {
        $uri = $this->getUri()->withHost($host);

        /** @var static $clone */
        $clone = $this->withUri($uri);

        return $clone;
    }
497289
protected function setPreserveHost(string $headerHost, string $host)
        {
            $header = [];
            if ($host !== '' && $headerHost === '') {
                $header = [
                    'original' => 'HTTP_HOST', 
                    'values'   => [$host]
                ];
            }
            return $header;
        }
845658
public function all($vhost = null)
    {
        if ($vhost) {
            return $this->client->send(sprintf('/api/bindings/%s', urlencode($vhost)));
        } else {
            return $this->client->send('/api/bindings');
        }
    }
556352
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $router = $this->getContainer()->get($this->getRouterServiceId());
        $name = $input->getArgument('name');
        $helper = new DescriptorHelper();

        if ($name) {
            $route = $router->getRouteCollection()->get($name);
            if (!$route) {
                throw new \InvalidArgumentException(sprintf('The route "%s" does not exist.', $name));
            }
            $this->convertItinerary($route);
            $helper->describe($output, $route, [
                'format' => $input->getOption('format'),
                'raw_text' => $input->getOption('raw'),
                'name' => $name,
            ]);
        } else {
            $routes = $router->getRouteCollection();

            foreach ($routes as $route) {
                $this->convertItinerary($route);
            }

            $helper->describe($output, $routes, [
                'format' => $input->getOption('format'),
                'raw_text' => $input->getOption('raw'),
                false,
            ]);
        }
    }
323992
protected function execute(InputInterface $input, OutputInterface $output)
	{
		$this->setupEnvironment('site', $input, $output);

		$version = new \JVersion;

		if ($input->getOption('short'))
		{
			$result = $version->getShortVersion();
		}
		elseif ($input->getOption('release'))
		{
			$result = $version->RELEASE;
		}
		else
		{
			$result = $version->getLongVersion();
		}
		$output->writeln($result);
	}
722553
def output_vhost(gandi, vhost, paas, output_keys, justify=14):
    
    output_generic(gandi, vhost, output_keys, justify)

    if 'paas_name' in output_keys:
        output_line(gandi, 'paas_name', paas, justify)
652896
protected function execute(InputInterface $input, OutputInterface $output)
  {
    if(empty($this->host))
    {
      if($this->cubexLocalSubDomain)
      {
        $this->host = $this->cubexLocalSubDomain . '.cubex-local.com';
      }
      else
      {
        $this->host = $this->debug ? '0.0.0.0' : 'localhost';
      }
    }

    if($this->port === null)
    {
      $this->port = 8888;
      $this->useNextAvailablePort = true;
    }

    if($this->useNextAvailablePort)
    {
      for($i = 0; $i < 100; $i++)
      {
        if($this->_isPortAvailable($this->port))
        {
          break;
        }
        $this->port++;
      }
    }

    if(ValueAs::bool($this->showfig))
    {
      $output->write(Figlet::create('PHP WEB', 'ivrit'));
      $output->write(Figlet::create('SERVER', 'ivrit'));
    }

    return $this->_runCommand($this->_buildCommand($output));
  }
463755
public function get($vhost, $user)
    {
        return $this->client->send(sprintf('/api/permissions/%s/%s', urlencode($vhost), urlencode($user)));
    }
39442
public function create($vhost, $user, array $permission)
    {
        if (!isset($permission['configure']) || !isset($permission['write']) || !isset($permission['read'])) {
            throw new InvalidArgumentException("Error creating permission: 'configure', 'write', and 'read' permissions must be properly set.");
        }

        return $this->client->send(sprintf('/api/permissions/%s/%s', urlencode($vhost), urlencode($user)), 'PUT', [], $permission);
    }
567508
public function setHost($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->host !== $v) {
            $this->host = $v;
            $this->modifiedColumns[SourceTableMap::COL_HOST] = true;
        }

        return $this;
    }
1177029
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $start = microtime(true);

        $this->setOutput($output);
        $this->setVerbosity($output->getVerbosity());

        $isChild = $input->getOption('child');

        if ($isChild && $output->getVerbosity() <= OutputInterface::VERBOSITY_NORMAL) {
            $this->setVerbosity(self::VERBOSITY_CHILD);
        }

        $this->getContainer()->get('ez_migration_bundle.step_executed_listener.tracing')->setOutput($output);

        // q: is it worth declaring a new, dedicated migration service ?
        $migrationService = $this->getMigrationService();
        $migrationService->setLoader($this->getContainer()->get('ez_migration_bundle.loader.filesystem_recursive'));

        $force = $input->getOption('force');

        $toExecute = $this->buildMigrationsList($input->getOption('path'), $migrationService, $force, $isChild);

        if (!count($toExecute)) {
            $this->writeln('<info>No migrations to execute</info>');
            return 0;
        }

        if ($isChild) {
            return $this->executeAsChild($input, $output, $toExecute, $force, $migrationService);
        } else {
            return $this->executeAsParent($input, $output, $toExecute, $start);
        }
    }
265706
public function binding($vhost, $exchange, $queue)
    {
        return $this->client->send(sprintf('/api/bindings/%s/e/%s/q/%s', urlencode($vhost), urlencode($exchange), urlencode($queue)));
    }
1083551
public function execute(InputInterface $input, OutputInterface $output)
    {
        // graviton root
        $baseDir = __DIR__.'/../../../';

        // vendorized? - go back some more..
        if (strpos($baseDir, '/vendor/') !== false) {
            $baseDir .= '../../../';
        }

        $this->finder
            ->in($baseDir)
            ->path('Resources/config')
            ->name('/migrations.(xml|yml)/')
            ->files();

        foreach ($this->finder as $file) {
            if (!$file->isFile()) {
                continue;
            }

            $output->writeln('Found '.$file->getRelativePathname());

            $command = $this->getApplication()->find('mongodb:migrations:migrate');

            $helperSet = $command->getHelperSet();
            $helperSet->set($this->documentManager, 'dm');
            $command->setHelperSet($helperSet);

            $configuration = $this->getConfiguration($file->getPathname(), $output);
            self::injectContainerToMigrations($this->container, $configuration->getMigrations());
            $command->setMigrationConfiguration($configuration);

            $arguments = $input->getArguments();
            $arguments['command'] = 'mongodb:migrations:migrate';
            $arguments['--configuration'] = $file->getPathname();

            $migrateInput = new ArrayInput($arguments);
            $migrateInput->setInteractive($input->isInteractive());
            $returnCode = $command->run($migrateInput, $output);

            if ($returnCode !== 0) {
                $this->errors[] = sprintf(
                    'Calling mongodb:migrations:migrate failed for %s',
                    $file->getRelativePathname()
                );
            }
        }

        if (!empty($this->errors)) {
            $output->writeln(
                sprintf('<error>%s</error>', implode(PHP_EOL, $this->errors))
            );
            return -1;
        }

        return 0;
    }
411320
protected function execute(InputInterface $input, OutputInterface $output)
    {

        $serverHelper = new DetermineServer();

        $from = $input->getArgument('from');

        $fromServer = $serverHelper->getServerForCommand($from);
        $fromPath = $serverHelper->getPathForCommand($from);


        if(strpos($from, '@') === 0 ){
            exec('ssh '.$fromServer.' "cd '.$fromPath.' ; du -hs fileadmin"', $result);
            $output->writeln($result);
        }else {
            exec('du -sh '.$fromServer.'fileadmin', $result);
            $output->writeln($result);
        }


        return 0;
    }
1366933
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $inputs = array_merge($input->getArguments(), $input->getOptions());

        $parameters = array();

        //
        $reflection = new ReflectionFunction($this->callback);

        foreach ($reflection->getParameters() as $parameter) {
            if (isset($inputs[$parameter->name])) {
                $parameters[$parameter->name] = $inputs[$parameter->name];
            }
        }

        return $this->container->call(
            $this->callback->bindTo($this, $this), $parameters
        );
    }