Longman\TelegramBot\Entities\UserProfilePhotos::getPhotos PHP Method

getPhotos() public method

This method overrides the default getPhotos method and returns a nice array
public getPhotos ( ) : Longman\TelegramBot\Entities\PhotoSize[]
return Longman\TelegramBot\Entities\PhotoSize[]
    public function getPhotos()
    {
        $all_photos = [];
        if ($these_photos = $this->getProperty('photos')) {
            foreach ($these_photos as $photos) {
                $new_photos = [];
                foreach ($photos as $photo) {
                    $new_photos[] = new PhotoSize($photo);
                }
                $all_photos[] = $new_photos;
            }
        }
        return $all_photos;
    }
UserProfilePhotos