@param Location $location

@return string
554606
public function dump(Location $location): string
    {
        $gpx = sprintf(<<<'GPX'
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx
version="1.0"
    creator="Geocoder" version="%s"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://www.topografix.com/GPX/1/0"
    xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">

GPX
        , Geocoder::VERSION);

        if (null !== $bounds = $location->getBounds()) {
            $gpx .= sprintf(<<<'GPX'
    <bounds minlat="%f" minlon="%f" maxlat="%f" maxlon="%f"/>

GPX
            , $bounds->getWest(), $bounds->getSouth(), $bounds->getEast(), $bounds->getNorth());
        }

        $lat = null;
        $lon = null;
        if (null !== $coordinates = $location->getCoordinates()) {
            $lat = $coordinates->getLatitude();
            $lon = $coordinates->getLongitude();
        }

        $gpx .= sprintf(<<<'GPX'
    <wpt lat="%.7f" lon="%.7f">
        <name><![CDATA[%s]]></name>
        <type><![CDATA[Address]]></type>
    </wpt>

GPX
        , $lat, $lon, $this->formatName($location));

        $gpx .= <<<'GPX'
</gpx>
GPX;

        return $gpx;
    }
473251
public function generate($location, array $options = [])
    {
        $uri = $this->fetchUrl($location, $options);
        $this->decorate($uri);
        return $uri;
    }
353363
public function getListEntry($location)
    {
        if ($location instanceof Zend_Gdata_Spreadsheets_ListQuery) {
            $uri = $location->getQueryUrl();
        } else {
            $uri = $location;
        }

        return parent::getEntry($uri, 'Zend_Gdata_Spreadsheets_ListEntry');
    }
1189322
protected function _getLocationTimestamp($location)
    {
        $cacheKey = 'mmi-head-ts-' . md5($location);
        $cache = $this->view->getCache();
        if (null !== $cache && (null !== ($ts = $cache->load($cacheKey)))) {
            return $ts;
        }
        //obliczanie timestampu
        $ts = file_exists($path = BASE_PATH . '/web' . $location) ? filemtime($path) : 0;
        if (null !== $cache) {
            $cache->save($ts, $cacheKey, 0);
        }
        return $ts;
    }
1314623
public function setLocation( Location $location )
    {
        foreach ( $this->handlers as $handler )
        {
            if ( $handler instanceof LocationAwareHandlerInterface )
            {
                $handler->setLocation( $location );
            }
        }
    }
319263
public function matchLocation(Location $location)
    {
        $urlAliasService = $this->repository->getURLAliasService();
        $locationUrls = array_merge(
            $urlAliasService->listLocationAliases($location),
            $urlAliasService->listLocationAliases($location, false)
        );

        foreach ($this->values as $pattern => $val) {
            foreach ($locationUrls as $urlAlias) {
                if (strpos($urlAlias->path, "/$pattern") === 0) {
                    return true;
                }
            }
        }

        return false;
    }
609605
public function add($location): bool
    {
        if ($this->hasLocation($location)) {
            return false;
        }

        return parent::add($location);
    }
1184136
public function sbDeleteRootDir($location)
    {
        $uri = 'sb.deleterootdir';
        $uriData = [
            'location' => $location
        ];

        try {
            $response = $this->_request(
                [
                    'uri' => $uri,
                    'type' => 'get',
                    'data' => $uriData
                ]
            );
        } catch (\Exception $e) {
            throw new InvalidException($e->getMessage());
        }

        return $response->getBody()->getContents();
    }
125226
private function createCustomUrlAddForm(Location $location): FormInterface
    {
        $customUrlAddData = new CustomUrlAddData($location);

        return $this->formFactory->addCustomUrl($customUrlAddData);
    }
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');
    }
1334680
protected function getConfig(Location $location)
    {
        $contentTypeConfig = $this->getConfigForContentType(
            $this->getContentType($location)
        );

        return array_replace($this->config, $contentTypeConfig);
    }
506084
public function getHandler( Location $location )
    {
        if ( isset( $this->map[$location->contentInfo->remoteId] ) )
        {
            return $this->map[$location->contentInfo->remoteId];
        }

        return new NullHandler();
    }
236019
public function baqiFromLocation($location = null, $time = null)
    {
        $this->guardAgainstEmptyArgument($location, 'location');

        $baqi = $this->getClient()->get("{$this->endpoint}/baqi/?location={$location}&datetime={$time}&key={$this->apiKey}");

        return $baqi->json();
    }
698134
public function getForm(Location $location)
    {
        if ( null === $this->formProvider )
        {
            throw new UnknownFormException();
        }

        return $this->formProvider->getForm( $location );
    }
860887
public function load($location)
	{
		if($this->isTesting())
		{
			$location = 'local';
		}

		if (file_exists($path = $this->getFile($location)))
		{
            return require_once($path);
		}

		return array();
	}
1166838
public function addLocation(Location $location)
    {
        // If this is the first Location, we can assume it can be the default
        if (!count($this->locations))
        {
            $this->setDefaultLocation($location);
        }

        $this->locations[] = $location;
        $location->setProfile($this);
    }
1012940
protected function getArray(Location $location): array
    {
        $properties = array_filter($location->toArray(), function ($value) {
            return !empty($value);
        });

        unset(
            $properties['latitude'],
            $properties['longitude'],
            $properties['bounds']
        );

        if (0 === count($properties)) {
            $properties = null;
        }

        $lat = 0;
        $lon = 0;
        if (null !== $coordinates = $location->getCoordinates()) {
            $lat = $coordinates->getLatitude();
            $lon = $coordinates->getLongitude();
        }

        $array = [
            'type' => 'Feature',
            'geometry' => [
                'type' => 'Point',
                'coordinates' => [$lon, $lat],
            ],
            'properties' => $properties,
        ];

        if (null !== $bounds = $location->getBounds()) {
            $array['bounds'] = $bounds->toArray();
        }

        return $array;
    }