1: <?php
2:
3: /**
4: * Copyright 2016 LINE Corporation
5: *
6: * LINE Corporation licenses this file to you under the Apache License,
7: * version 2.0 (the "License"); you may not use this file except in compliance
8: * with the License. You may obtain a copy of the License at:
9: *
10: * https://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15: * License for the specific language governing permissions and limitations
16: * under the License.
17: */
18:
19: namespace LINE\LINEBot\Event\MessageEvent;
20:
21: use LINE\LINEBot\Event\MessageEvent;
22:
23: /**
24: * A class that represents the message event of location.
25: *
26: * @package LINE\LINEBot\Event\MessageEvent
27: */
28: class LocationMessage extends MessageEvent
29: {
30: /**
31: * LocationMessage constructor.
32: *
33: * @param array $event
34: */
35: public function __construct($event)
36: {
37: parent::__construct($event);
38: }
39:
40: /**
41: * Returns title of the location message.
42: *
43: * @return string
44: */
45: public function getTitle()
46: {
47: return $this->message['title'];
48: }
49:
50: /**
51: * Returns address of the location message.
52: *
53: * @return string
54: */
55: public function getAddress()
56: {
57: return $this->message['address'];
58: }
59:
60: /**
61: * Returns latitude of the location message.
62: *
63: * @return double
64: */
65: public function getLatitude()
66: {
67: return $this->message['latitude'];
68: }
69:
70: /**
71: * Returns longitude of the location message.
72: *
73: * @return double
74: */
75: public function getLongitude()
76: {
77: return $this->message['longitude'];
78: }
79: }
80: