Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F626986
Location.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
Location.php
View Options
<?php
/*
* This file is part of the TelegramBot package.
*
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace
Longman
\
TelegramBot
\
Entities
;
use
Longman
\
TelegramBot
\
Exception
\
TelegramException
;
class
Location
extends
Entity
{
protected
$longitude
;
protected
$latitude
;
public
function
__construct
(
array
$data
)
{
$this
->
longitude
=
isset
(
$data
[
'longitude'
]
)
?
$data
[
'longitude'
]
:
null
;
if
(
empty
(
$this
->
longitude
)
)
{
throw
new
TelegramException
(
'longitude is empty!'
)
;
}
$this
->
latitude
=
isset
(
$data
[
'latitude'
]
)
?
$data
[
'latitude'
]
:
null
;
if
(
empty
(
$this
->
latitude
)
)
{
throw
new
TelegramException
(
'latitude is empty!'
)
;
}
}
public
function
getLongitude
(
)
{
return
$this
->
longitude
;
}
public
function
getLatitude
(
)
{
return
$this
->
latitude
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 15, 1:26 AM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
135623
Default Alt Text
Location.php (1 KB)
Attached To
Mode
R123 php-telegram-bot
Attached
Detach File
Event Timeline