Sets the destination host for the api definition.

@param ApiDefinition $apiDef Configuration for the swagger api to be recognized.

@return void
18304
private function registerHost(ApiDefinition $apiDef)
    {
        try {
            $host = $this->document->getHost();
        } catch (MissingDocumentPropertyException $e) {
            $host = $this->fallbackData['host'];
        }
        $apiDef->setHost($host);
    }
1071041
public function setRequest(RequestDescription $request)
    {
        $this->request = $request;
        $this->stack->setRequest($request);
    }
315299
private function configure_api()
    {

        // ensure current annotations setting is an array of path or transform into it
        $current_annotations = config('l5-swagger.paths.annotations');
        if (! is_array($current_annotations))
            $current_annotations = [$current_annotations];

        // merge paths together and update config
        config([
            'l5-swagger.paths.annotations' => array_unique(array_merge($current_annotations, [
                __DIR__ . '/Models',
            ])),
        ]);
    }
171438
public function setApiVersion($apiVersion)
    {
        if ( ! in_array($apiVersion, self::$supportedApiVersions)) {
            throw new ApiVersionNotSupported(sprintf('API version %d is not supported.', $apiVersion));
        }
        $this->apiVersion = $apiVersion;
    }
1035891
public function setAuthnContextDecl(Chunk $authnContextDecl) : void
    {
        if (!empty($this->authnContextDeclRef)) {
            throw new \Exception(
                'AuthnContextDeclRef is already registered! May only have either a Decl or a DeclRef, not both!'
            );
        }

        $this->authnContextDecl = $authnContextDecl;
    }
281387
public function setApiEndpoint($url)
    {
        $this->apiEndpoint = $url;
        return $this->apiEndpoint === $url ? true : false;
    }
268897
public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef)
    {
        $fieldDef->fieldTypeConstraints->fieldSettings = new FieldSettings(
            array(
                'isMultiple' => !empty($storageDef->dataInt1) ? (bool)$storageDef->dataInt1 : false,
            )
        );

        $fieldDef->defaultValue->data = empty($storageDef->dataText5)
            ? null
            : explode(',', $storageDef->dataText5);
        // TODO This will contain comma separated country codes, which is correct for value but not for sort key.
        // Sort key should contain comma separated lowercased country names.
        $fieldDef->defaultValue->sortKey = $storageDef->dataText5;
    }
99621
public function loadEndpoints(string $endpointMap):ApiClientInterface{

		if(class_exists($endpointMap)){
			$this->endpoints = new $endpointMap;

			if(!$this->endpoints instanceof EndpointMapInterface){
				throw new ApiClientException('invalid endpoint map');
			}
		}

		/** @noinspection PhpIncompatibleReturnTypeInspection */
		return $this;
	}
576484
public function saveApiEndpoint($apiEndpoint, $websiteId)
    {
        if ($websiteId > 0) {
            $scope = \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE;
        } else {
            $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT;
        }
        $this->writer->save(
            \Dotdigitalgroup\Email\Helper\Config::PATH_FOR_API_ENDPOINT,
            $apiEndpoint,
            $scope,
            $websiteId
        );
    }
846995
public function setBBCodeDefinition(BBcodeDefinitionInterface $codeDef)
    {
        $this->codeDefinition = $codeDef;
        $this->setTagName($codeDef->getTagName());
    }
1114777
static function create($apikey, array $conf = []) {
        $clnt = new YunpianClient();
        $clnt->conf->init()->with($apikey, $conf);
        $clnt->initHttp($clnt->conf); // YunpianGuzzle->initHttp
        return $clnt;
    }
344477
public function send(RequestDescriptor $request, $flags = 0)
    {
        if (!empty($this->getAuthorization())) {
            $request->addHeader(self::OPTION_HEADER_AUTHORIZATION, $this->getAuthorization());
        }

        if ($this->delayNext || $this->isDelayed) {
            if (!$this->forceNext) {
                $this->delayedRequests[] = array($request, $flags | ApiRequestOption::NO_RESPONSE);

                // reset stackNext flag
                $this->delayNext = false;

                return true;
            } else {
                // reset forceNext flag
                $this->forceNext = false;
            }
        }

        $transport = $this->getAppropriateTransport($flags);

        if (is_null($transport)) {
            throw new ApiClientException(sprintf('No transport has been set on "%s"', get_class()));
        }

        try {
            $response = $transport->send($request, $flags);
        } catch (TransportException $e) {
            // fallback?
            if ($fallback = $this->getFallbackTransport()) {
                $response = $fallback->send($request, $flags);
            } else {
                throw $e;
            }
        }

        $this->resetFallbackTransport();

        return $response;
    }
98969
protected function define(ClassDefinition $class)
    {
        $class->property($this->address)->asString();
        $class->property($this->latLng)->asObject(LatLng::class);
    }
1288046
public function setEndpoint($url)
	{
		// Remove trailing slash in the url.
		$url = rtrim($url, '/');

		if ( $url !== $this->endpoint ) {
			$this->endpoint = $url;
			$this->clearLocalCaches();
		}
	}
505936
public function setEndpointParameters($endpointName, array $parameters)
    {
        /** @var AbstractSearchEndpoint $endpoint */
        $endpoint = $this->getEndpoint($endpointName);
        $endpoint->setParameters($parameters);
    }
104305
public function deleteShared($apiKey, $pin)
    {
        $url     = self::API_SHARED_URL.$pin->getId();
        $headers = [
            self::API_SHARED_KEY => $apiKey,
        ];

        $this->log("Pusher::deleteShared => {$url}", ['headers' => $headers]);

        $this->delete($url, $headers);
    }
173220
final public function setDestinationDirectory(string $destinationDirectory)
    {
        if ($destinationDirectory[strlen($destinationDirectory) - 1] != DIRECTORY_SEPARATOR) {
            $destinationDirectory .= DIRECTORY_SEPARATOR;
        }
        $this->destinationDirectory = $destinationDirectory;
    }