Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F629057
UserProfilePhotos.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
UserProfilePhotos.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
;
/**
* Class UserProfilePhotos
*
* @link https://core.telegram.org/bots/api#userprofilephotos
*
* @method int getTotalCount() Total number of profile pictures the target user has
*/
class
UserProfilePhotos
extends
Entity
{
/**
* {@inheritdoc}
*/
protected
function
subEntities
(
)
:
array
{
return
[
'photos'
=>
PhotoSize
::
class
,
]
;
}
/**
* Requested profile pictures (in up to 4 sizes each)
*
* This method overrides the default getPhotos method and returns a nice array
*
* @return PhotoSize[][]
*/
public
function
getPhotos
(
)
:
array
{
$all_photos
=
[
]
;
if
(
$these_photos
=
$this
->
getProperty
(
'photos'
)
)
{
foreach
(
$these_photos
as
$photos
)
{
$all_photos
[
]
=
array_map
(
function
(
$photo
)
{
return
new
PhotoSize
(
$photo
)
;
}
,
$photos
)
;
}
}
return
$all_photos
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 15, 5:51 AM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
128850
Default Alt Text
UserProfilePhotos.php (1 KB)
Attached To
Mode
R123 php-telegram-bot
Attached
Detach File
Event Timeline