Creates a everyman client based on the configuration parameters.

@return Client
3170
function getClient()
    {
        $transport = $this->getTransport();
        $transport->setAuth($this->username, $this->password);

        return new Client($transport);
    }
700094
public function client()
    {
        $query = $this->pdo->prepare(<<<SQL
SELECT
  content,
  statusCode,
  nextUpdate,
  effective,
  worker,
  UNIX_TIMESTAMP()
FROM robotstxt__cache1
WHERE base = :base;
SQL
        );
        $query->bindValue('base', $this->base, \PDO::PARAM_STR);
        $query->execute();
        if ($query->rowCount() > 0) {
            $row = $query->fetch(\PDO::FETCH_ASSOC);
            $this->clockSyncCheck($row['UNIX_TIMESTAMP()'], self::OUT_OF_SYNC_TIME_LIMIT);
            if ($row['nextUpdate'] >= $row['UNIX_TIMESTAMP()']) {
                $this->markAsActive($row['worker']);
                return new TxtClient($this->base, $row['statusCode'], $row['content'], self::ENCODING, $row['effective'], $this->byteLimit);
            }
        }
        $query = $this->pdo->prepare(<<<SQL
UPDATE robotstxt__cache1
SET worker = 0
WHERE base = :base;
SQL
        );
        $query->bindValue('base', $this->base, \PDO::PARAM_STR);
        $query->execute();
        return $this->refresh();
    }
718451
public function create()
    {

        $callback = $this->callback;

        if (is_callback_function($callback)) {
            $callback($this);
        }

        $params = [

            'index' => $this->name,

            'body' => [
                "settings" => [
                    'number_of_shards' => $this->shards,
                    'number_of_replicas' => $this->replicas
                ]
            ],

            'client' => [
                'ignore' => $this->ignores
            ]
        ];

        if (count($this->mappings)) {
            $params["body"]["mappings"] = $this->mappings;
        }

        return $this->connection->indices()->create($params);
    }
232591
public function getClient()
    {
        if (!$this->client) {
            $client = new GuzzleHelper();

            $this->configureClient($client);

            return $this->client = $client->getClient();
        }

        return $this->client;
    }
118975
public function allOtherClients()
    {
        $current_client = $this->client;

        $filter = function ($client) use ($current_client) {
            return $client !== $current_client;
        };

        return $this->clients->filter($filter);
    }
1091078
public function getElasticSearchClient()
    {
        $config = $this->getElasticConfig();

        // elasticsearch v2.0 using builder
        if (class_exists('\Elasticsearch\ClientBuilder')) {
            return \Elasticsearch\ClientBuilder::fromConfig($config);
        }

        // elasticsearch v1
        return new \Elasticsearch\Client($config);
    }
25704
public function createClient()
    {
        $indexConfig = ArrayList::create(Config::config()->get('indices'))
            ->filter(['name' => $this->indexName])->first();

        $this->clientAPI   = new DataList($indexConfig['class']);
        $this->indexConfig = $indexConfig;

        return $this->clientAPI;
    }
761751
public function build()
    {
        $soapClientFactory = new SoapClientFactory();
        $soapClient = $soapClientFactory->factory($this->wsdl, $this->soapOptions);

        $client = new Client($soapClient, $this->username, $this->password, $this->token);

        if ($this->log) {
            $logPlugin = new LogPlugin($this->log);
            $client->getEventDispatcher()->addSubscriber($logPlugin);
        }

        return $client;
    }
441708
public function make(string $driver): ClientContract
    {
        $config = $this->app->make('config')->get("microservice-client.clients.{$driver}");
        $options = $this->serviceConfig();

        switch ($config['name']) {
            case 'restful':
                return new Restful($this->app->make('client.manager'), $config, $options);
        }

        throw new InvalidArgumentException("Unsupported driver [{$config['name']}]");
    }
932010
protected function client()
    {
        $dsn = $this->config('dsn');
        if (!$dsn) {
            return null;
        }

        $client = new Raven_Client($dsn);
        $callInstall = $this->config('callInstall');
        if ($callInstall === true) {
            $client->install();
        }

        return $client;
    }
1035719
public function createClient()
	{
		$client = ClientBuilder::fromConfig($this->environment->all());

		$this->setClient($client);
	}
881908
public function create()
    {
        $instance = self::createStripeGateway($this);
        $this->setId($instance->getId());
        return $instance;
    }
116727
public function getHttpClient(): ClientInterface
    {
        if (!($this->httpClient instanceof ClientInterface)) {
            if (property_exists($this, 'app') && $this->app['http_client']) {
                $this->httpClient = $this->app['http_client'];
            } else {
                $this->httpClient = new Client(['handler' => HandlerStack::create($this->getGuzzleHandler())]);
            }
        }

        return $this->httpClient;
    }
593902
public function create(): self
    {
        $this->payload = null;
        $this->aad = null;
        $this->recipients = [];
        $this->sharedProtectedHeader = [];
        $this->sharedHeader = [];
        $this->compressionMethod = null;
        $this->contentEncryptionAlgorithm = null;
        $this->keyManagementMode = null;

        return $this;
    }
122392
protected function authClient(): ClientInterface
    {
        return new Client(new BasicAuth($this->clientId, $this->clientSecret), $this->auth_server);
    }
671350
protected function createAggregateClient()
	{
		$servers = array_values($this->servers);
		foreach ($servers as $k => $server)
		{
			$servers[$k] = (array) $server;
		}

		return array('default' => new Client($servers, $this->options));
	}
1230394
public function build()
    {
        $soapClient = (new Factory)->getClient($this->getEndpoint(), $this->getSoapOptions());

        $params['user_id'] = $this->userId;
        $params['agent_code'] = $this->agentCode;
        $params['agent_seq'] = $this->agentSeq;
        $client = new $this->client($soapClient, $params);

        if ($this->log) {
            //
        }

        return $client;
    }