Allows to set the SoapClient location to call
@uses AbstractSoapClientBase::getSoapClient()
@uses SoapClient::__setLocation()
@param string $location
@return AbstractSoapClientBase
175920
public function setLocation($location)
    {
        if ($this->getSoapClient() instanceof \SoapClient) {
            $this->getSoapClient()->__setLocation($location);
        }
        return $this;
    }
726054
public function setLocation(\BlackForest\PiwikBundle\Entity\PiwikLocation $location = null)
    {
        $this->location = $location;

        return $this;
    }
516390
protected function createLocation(Token $start): ?Location
    {
        return !$this->lexer->getOption('noLocation', false)
            ? new Location(
                $start->getStart(),
                $this->lexer->getLastToken()->getEnd(),
                $this->lexer->getSource()
            )
            : null;
    }
180939
public function setLocationType($locationType)
    {
        $allowedValues = $this->getLocationTypeAllowableValues();
        if (!is_null($locationType) && !in_array($locationType, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'locationType', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['locationType'] = $locationType;

        return $this;
    }
934727
public function setKey($location, $key) {
		$this->keys[(integer)$location] = (string)$key;
		return $this;
	}
1061564
protected function loadContext($location)
    {
        $context = new Context();

        $cacheFile = $location . '/cache/apidoc.data';
        $this->stdout('Loading apidoc data from cache... ');
        if (file_exists($cacheFile)) {
            $context = unserialize(file_get_contents($cacheFile));
            $this->stdout('done.' . PHP_EOL, Console::FG_GREEN);
        } else {
            $this->stdout('no data available.' . PHP_EOL, Console::FG_YELLOW);
        }

        return $context;
    }
341042
protected function location($url)
    {
        /** @var $response Response */
        $response = $this->getResponse();

        $response->getHeaders()
            ->addHeaderLine(
                'Location',
                $url
            );

        $response->setStatusCode(201);

        return $response;
    }
323614
public function getCellFeed($location)
    {
        if ($location instanceof Zend_Gdata_Spreadsheets_CellQuery) {
            $uri = $location->getQueryUrl();
        } else if ($location instanceof Zend_Gdata_Spreadsheets_WorksheetEntry) {
            $uri = $location->getLink(self::CELL_FEED_LINK_URI)->href;
        } else {
            $uri = $location;
        }
        return parent::getFeed($uri, 'Zend_Gdata_Spreadsheets_CellFeed');
    }
211695
public function setServiceEndpoint(string $endpoint): AbstractClientBuilder
    {
        if (!filter_var($endpoint, FILTER_VALIDATE_URL) || parse_url($endpoint, PHP_URL_SCHEME) !== 'https') {
            throw new \InvalidArgumentException('Incorrect endpoint given');
        }

        $this->endpoint = $endpoint;

        return $this;
    }
1317136
public function setLocation(Location $location = null)
    {
        $this->location = $location;

        $this->setStartDate(new \DateTime('now', new \DateTimeZone('UTC')));

        return $this;
    }
125226
private function createCustomUrlAddForm(Location $location): FormInterface
    {
        $customUrlAddData = new CustomUrlAddData($location);

        return $this->formFactory->addCustomUrl($customUrlAddData);
    }
820032
public function createLocation(Location $location): UIValue\Content\Location
    {
        return new UIValue\Content\Location($location, [
            'childCount' => $this->locationService->getLocationChildCount($location),
            'pathLocations' => $this->pathService->loadPathLocations($location),
            'userCanManage' => $this->permissionResolver->canUser(
                'content', 'manage_locations', $location->getContentInfo()
            ),
            'userCanRemove' => $this->permissionResolver->canUser(
                'content', 'remove', $location->getContentInfo(), [$location]
            ),
            'userCanEdit' => $this->permissionResolver->canUser(
                'content', 'edit', $location->getContentInfo(), [$location]
            ),
            'main' => $location->getContentInfo()->mainLocationId === $location->id,
        ]);
    }
629634
public function getLocationService()
    {
        if ($this->locationService !== null) {
            return $this->locationService;
        }

        $this->locationService = new LocationService(
            $this,
            $this->persistenceHandler,
            $this->getDomainMapper(),
            $this->getNameSchemaService(),
            $this->getPermissionCriterionResolver(),
            $this->serviceSettings['location'],
            $this->logger
        );

        return $this->locationService;
    }
687490
public static function setBucketRedirect($bucket = NULL, $location = NULL)
	{
		$rest = new S3Request('PUT', $bucket, '', self::$endpoint);

		if( empty($bucket) || empty($location) ) {
			self::__triggerError("S3::setBucketRedirect({$bucket}, {$location}): Empty parameter.", __FILE__, __LINE__);
			return false;
		}

		$dom = new DOMDocument;
		$websiteConfiguration = $dom->createElement('WebsiteConfiguration');
		$redirectAllRequestsTo = $dom->createElement('RedirectAllRequestsTo');
		$hostName = $dom->createElement('HostName', $location);
		$redirectAllRequestsTo->appendChild($hostName);
		$websiteConfiguration->appendChild($redirectAllRequestsTo);
		$dom->appendChild($websiteConfiguration);
		$rest->setParameter('website', null);
		$rest->data = $dom->saveXML();
		$rest->size = strlen($rest->data);
		$rest->setHeader('Content-Type', 'application/xml');
		$rest = $rest->getResponse();

		if ($rest->error === false && $rest->code !== 200)
			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
		if ($rest->error !== false)
		{
			self::__triggerError(sprintf("S3::setBucketRedirect({$bucket}, {$location}): [%s] %s",
			$rest->error['code'], $rest->error['message']), __FILE__, __LINE__);
			return false;
		}
		return true;
	}
823674
public function createLocation(string $location, string $match = null) : Location
    {
        return new Location(new Param($location), is_null($match) ? null : new Param($match));
    }
963961
public function load(Location $location): self
    {
        $customUrlAliases = $this->urlAliasService->listLocationAliases($location, true, null, true);
        $this->data = array_map(
            function (URLAlias $urlAlias) {
                return $this->valueFactory->createUrlAlias($urlAlias);
            },
            $customUrlAliases
        );

        return $this;
    }
953513
public function loadPathLocations(Location $location)
    {
        $locationQuery = new LocationQuery([
            'filter' => new Ancestor($location->pathString),
            'sortClauses' => [new Path()],
        ]);

        $searchResult = $this->searchService->findLocations($locationQuery);

        return array_map(function (SearchHit $searchHit) {
            return $searchHit->valueObject;
        }, $searchResult->searchHits);
    }