Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F629710
Update.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
Update.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
Update
extends
Entity
{
protected
$update_id
;
protected
$message
;
public
function
__construct
(
array
$data
,
$bot_name
)
{
$update_id
=
isset
(
$data
[
'update_id'
]
)
?
$data
[
'update_id'
]
:
null
;
$message
=
isset
(
$data
[
'message'
]
)
?
$data
[
'message'
]
:
null
;
if
(
empty
(
$update_id
)
)
{
throw
new
TelegramException
(
'update_id is empty!'
)
;
}
$this
->
bot_name
=
$bot_name
;
$this
->
update_id
=
$update_id
;
$this
->
message
=
new
Message
(
$message
,
$bot_name
)
;
}
public
function
getUpdateId
(
)
{
return
$this
->
update_id
;
}
public
function
getMessage
(
)
{
return
$this
->
message
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 15, 7:36 AM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
146951
Default Alt Text
Update.php (1 KB)
Attached To
Mode
R123 php-telegram-bot
Attached
Detach File
Event Timeline