Create a location object from an incoming message.
@return Location
186726
private function getLocation()
    {
        return new Location($this->event->get('Location_X'), $this->event->get('Location_Y'), $this->event);
    }
961305
protected function Location()
    {
        if ($this->Container()->Exists()) {
            return Enums\ContentLocation::Container();
        }
        else if ($this->Area()->Exists()) {
            if ($this->Page()->Exists()) {
                return Enums\ContentLocation::Page();
            }
            return Enums\ContentLocation::Layout();
        }
        return null;
    }
265217
@Override
    public XMLStreamLocation2 getLocation()
    {
        return new WstxInputLocation(null, // no parent
        		null, (String) null, // pub/sys ids not yet known
        		mWriter.getAbsOffset(),
        		mWriter.getRow(), mWriter.getColumn());
    }
567528
protected function createOutgoingMessage()
    {
        $message = new OutgoingMessage($this->container['view']);

        //If a from address is set, pass it along to the message class.
        if (isset($this->from)) {
            $message->from($this->from);
        }

        return $message;
    }
1167606
public com.google.api.ads.adwords.axis.v201809.cm.Location getLocation() {
        return location;
    }
754356
public function setLocation($location) {
    $c = http_response_code();
    $this->_setHeader('Location',$location);
    http_response_code($c);
    return $this;
  }
881794
protected LocationCoordinates getLocationMessage(MessageEnvelope envelope) {
		if (envelope != null
				&& envelope.getMessage() != null
				&& envelope.getMessage().getAttachments() != null
				&& envelope.getMessage().getAttachments().get(0) != null
				&& envelope.getMessage().getAttachments().get(0).getPayload() != null
				&& envelope.getMessage().getAttachments().get(0).getPayload() instanceof QuickReplyLocationPayload) {

			QuickReplyLocationPayload payload = (QuickReplyLocationPayload) envelope
					.getMessage().getAttachments().get(0).getPayload();

			return payload.getCoordinates();
		}
		return null;
	}
529108
public function getLastMessage()
    {
        if (($message = $this->getMessages()->orderBy(['created_at' => SORT_DESC])->limit(1)->one()) != null) {
            return $message;
        }
        return $this;
    }
465608
public function listLocations()
    {
        $context = new HttpCallContext();
        $context->setMethod(Resources::HTTP_GET);
        $context->setPath($this->_getLocationPath());
        $context->addStatusCode(Resources::STATUS_OK);

        $response = $this->sendHttpContext($context);
        $serialized = $this->dataSerializer->unserialize($response->getBody());

        return ListLocationsResult::create($serialized);
    }
939454
@Override
	@Pure
	public GeoLocation getGeoLocation() {
		final Rectangle2d b = getBoundingBox();
		if (b == null) {
			return new GeoLocationNowhere(getUUID());
		}
		return new GeoLocationPoint(b.getCenterX(), b.getCenterY());
	}
54771
private function getFindReplaceLocationMapNameText() {
    $config = $this->configFactory->get('openy_programs_search.settings');
    $exclude_location_map = $config->get('name_string_replace_location_map');

    return is_array($exclude_location_map) ? $exclude_location_map : [];
  }
611116
protected function buildLocator()
    {
        $this
            ->resetLocatorBuffer()
            ->getReferenceBuffer()
            ->reset();
        $state = self::STATE_POINTER_PART;
        while (true) {
            switch ($state) {
                case self::STATE_POINTER_PART:
                    // Expecting part of a pointer or end of text.
                    $state = $this->processPointerPartState();
                    break;

                case self::STATE_REFERENCE_PART:
                    // Expecting reference token part.
                    $state = $this->processReferencePartState();
                    break;

                case self::STATE_FINISH:
                    // End of text is found, parsing is finished successfully.
                    break 2;

                default:
                    throw new DomainException("Invalid parser state: {$state}");
            }
        }
        $this->locator = $this->getLocatorBuffer();
        return $this
            ->resetLocatorBuffer();
    }
931248
public function getLocation() : ?string 
    {
        if ( ! $this->hasLocation()) {
            $this->setLocation($this->getDefaultLocation());
        }
        return $this->location;
    }
184936
public static Location createLocation(String rawJSON) throws TwitterException {
        try {
            return new LocationJSONImpl(new JSONObject(rawJSON));
        } catch (JSONException e) {
            throw new TwitterException(e);
        }
    }
1211153
private function convertToLocationObject($parentLocation)
    {
        $locationObject = new LocationObject(array());

        switch (true) {
            case $parentLocation instanceof Location:
                $locationObject->getMapper()->locationToObject($parentLocation);
                break;
            case is_int($parentLocation):
                $locationObject->data['parent_location_id'] = $parentLocation;
                break;
            case $parentLocation instanceof LocationObject:
            default:
                $locationObject = $parentLocation;
        }

        return $locationObject;
    }
666645
public function getLocation()
    {
        if (null === $this->location) {
            $array=[];
            if (null != $this->locations) {
                foreach ($this->locations as $location) { /* @var \Core\Entity\LocationInterface $location */
                    $array[]=(string) $location;
                }
                return implode(', ', $array);
            }
        }
        return $this->location;
    }
203923
protected function initLocator()
    {
        $services = $this->options->get('services');

        if (is_array($services) && !$this->isServicesInited) {
            $this->isServicesInited = true;
            foreach ($services as $serviceName => $serviceDescription) {
                $instance = $this->instantiateFromArray($serviceDescription);
                $this->locator->set($serviceName, $instance);
            }
        }

        return $this->locator;
    }