Returns the location.

@return Location|null
344424
public function getLocation(): Location
    {
        if ($this->location === false && $this->_repository !== null) {
            $this->_repository->injectLocation($this);
        }

        return $this->location ?: null;
    }
573579
public static function getUserDefaultLocation()
    {
        try {
            $user = self::getLoggedInUser();
            if ($user->PrimaryLocation) {
                return $user->PrimaryLocation;
            }

            if ($user->Locations && $user->Locations->count()) {
                $user->PrimaryLocationID = $user->Locations[0]->UniqueIdentifier;
                $user->save();
                return $user->PrimaryLocation;
            }
        } catch (NotLoggedInException $ex) {
        }

        $basket = Basket::getCurrentBasket();
        if ($basket->Locations && $basket->Locations->count()) {
            if (isset($user)) {
                $user->PrimaryLocationID = $basket->Locations[0];
                $user->save();
                return $user->PrimaryLocation;
            }
            return $basket->Locations[0];
        }
        return null;
    }
116337
public function getLocationService()
    {
        if (null === $this->locationService) {
            $this->locationService = new LocationService(
                $this->client,
                $this->inputDispatcher,
                $this->outputVisitor,
                $this->requestParser
            );
        }

        return $this->locationService;
    }
1013672
public function currentPosition()
    {
        $parent = $this->parent();
        $collection = $parent ? $parent->collection('content', false) : null;
        if ($collection instanceof Collection) {
            return $collection->currentPosition($this->path());
        }

        return 1;
    }
878184
public function getRegion()
    {
        $region = $this->getRegionFromLocale($this->getLocale());
        if (!$region) {
            $region = $this->findRegion();
        }

        return $region;
    }
28982
public function getLocation() : ?int 
    {
        if ( ! $this->hasLocation()) {
            $this->setLocation($this->getDefaultLocation());
        }
        return $this->location;
    }
680021
@Programmatic
    @Override
    public Location getLocation() {
        final String latLng = getLatLng();
        return latLng != null? Location.fromString(latLng.replace(",",";")): null;
    }
87878
public function getDebugLocation()
    {
        $location = '';
        if ($this->class && ($this->method || $this->property)) {
            $location .= $this->fullyQualifiedName($this->class);
            if ($this->method) {
                $location .= ($this->static ? '::' : '->') . $this->method . '()';
            } elseif ($this->property) {
                $location .= ($this->static ? '::$' : '->') . $this->property;
            }
        }
        if ($this->filename) {
            if ($location !== '') {
                $location .= ' in ';
            }
            $location .= $this->filename;
        }
        if ($this->line) {
            if ($location !== '') {
                $location .= ' on';
            }
            $location .= ' line ' . $this->line;
            if ($this->character) {
                $location .= ':' . $this->character;
            }
        }

        return $location;
    }
910717
public function getWhere()
    {
        if (!isset($this->setWhere) or empty($this->setWhere)) {
            $this->setWhere = null;
        }

        return $this->setWhere;
    }
1335397
public function dump() : ?string
    {
        if ($this->return) {
            return $this->dumpReturn();

        } elseif (!Tracy::$productionMode) {
            Dumper::dump($this->var, $this->getOptions() + [
                Dumper::LOCATION => Tracy::$showLocation,
            ]);
        }

        return null;
    }
637108
public function getPath()
    {
        $path = parent::getPath();
        if ('' == $path)
        {
            $path = '/';
        }
        if ($this->siteRoot)
        {
            $path = substr($path, strlen($this->siteRoot));
        }
        return $path;
    }
59816
public function getLocation($ip = null)
    {
        // Get location data
        $this->location = $this->find($ip);

        // Should cache location
        if ($this->shouldCache($ip, $this->location)) {
            $this->getCache()->set($ip, $this->location);
        }

        return $this->location;
    }
1122242
public function getLocationByClassName($className)
    {
        if (is_object($className)) $className = get_class($className);
        if (isset($this->known[$className]['location'])) {
            return $this->known[$className]['location'];
        } else {
            return null;
        }
    }
878291
public function locate()
    {
        foreach ($this->paths as $path) {
            $resolvedPath = stream_resolve_include_path($path);
            if (! $resolvedPath) {
                continue;
                
            }
            $configuration = require $resolvedPath;
            if (! $configuration instanceof Configuration) {
                throw new ConfigurationException(
                    "$resolvedPath must return a malkusch\\bav\\Configuration object."
                );

            }
            return $configuration;
            
        }
        return null;
    }
635787
public function getLocation()
    {

        if (! $apiKey = $this->getApiKey()) {
            return null;
        }

        $ip = $this->configHelper->getClientIp();

        // try getting location from cache
        $cacheIdentifier = md5(self::CACHE_PREFIX.$ip);
        $locationJson = $this->cache->load($cacheIdentifier);

        // if found return it
        if ($locationJson) {
            return $locationJson;
        }

        // otherwise call the API
        $locationJson = $this->getLocationJson($ip, $apiKey);

        // if no error cache it and return it
        if ($locationJson) {
            $this->cache->save($locationJson, $cacheIdentifier, [], 86400);
            return $locationJson;
        }

        return null;
    }
1351671
protected static Location getLocation() {
        Context applicationContext = getApplicationContext();

        if (applicationContext == null)
            return null;

        LocationManager locationManager = (LocationManager) applicationContext.getSystemService(Context.LOCATION_SERVICE);
        try {
            Location best = null;
            for (String provider : locationManager.getAllProviders()) {
                Location location;
                try {
                    location = locationManager.getLastKnownLocation(provider);
                } catch (SecurityException ex) {
                    continue;
                }
                // If this location is null, discard
                if (null == location) {
                    continue;
                }

                // If no, broken or poor accuracy, discard
                if (location.getAccuracy() <= 0 || location.getAccuracy() >= 10000) {
                    continue;
                }

                // Skip locations old enough to belong to an older session
                if (location.getTime() < System.currentTimeMillis() - WonderPush.DIFFERENT_SESSION_REGULAR_MIN_TIME_GAP) {
                    continue;
                }

                // If we have no best yet, use this first location
                if (null == best) {
                    best = location;
                    continue;
                }

                // If this location is more than 2 minutes older than the current best, discard
                if (location.getTime() < best.getTime() - 2 * 60 * 1000) {
                    continue;
                }

                // If this location is less precise (ie. has a *larger* accuracy radius), discard
                if (location.getAccuracy() > best.getAccuracy()) {
                    continue;
                }

                best = location;
            }

            return best;
        } catch (java.lang.SecurityException e) {
            // Missing permission;
            return null;
        }
    }
1012384
public function getNavigation()
    {
        if ( empty( $this->menuId ) )
        {
            return null;
        }

        return $this->getMenuModel()
                    ->findNavigation( $this->menuId );
    }