Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F623543
User.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
User.php
View Options
<?php
/*
* This file is part of the TelegramApi 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
\
TelegramApi
\
Entities
;
class
User
{
protected
$id
;
protected
$first_name
;
protected
$last_name
;
protected
$username
;
public
function
__construct
(
array
$data
)
{
$this
->
id
=
isset
(
$data
[
'id'
]
)
?
$data
[
'id'
]
:
null
;
if
(
empty
(
$this
->
id
)
)
{
throw
new
\
Exception
(
'id is empty!'
)
;
}
$this
->
first_name
=
isset
(
$data
[
'first_name'
]
)
?
$data
[
'first_name'
]
:
null
;
if
(
empty
(
$this
->
first_name
)
)
{
throw
new
\
Exception
(
'first_name is empty!'
)
;
}
$this
->
last_name
=
isset
(
$data
[
'last_name'
]
)
?
$data
[
'last_name'
]
:
null
;
$this
->
username
=
isset
(
$data
[
'username'
]
)
?
$data
[
'username'
]
:
null
;
}
public
function
getId
(
)
{
return
$this
->
id
;
}
public
function
getFirstName
(
)
{
return
$this
->
first_name
;
}
public
function
getLastName
(
)
{
return
$this
->
last_name
;
}
public
function
getUsername
(
)
{
return
$this
->
username
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 14, 9:21 PM (11 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
127502
Default Alt Text
User.php (1 KB)
Attached To
Mode
R123 php-telegram-bot
Attached
Detach File
Event Timeline