Вход Регистрация
Файл: upload/core/vendor/longman/telegram-bot/src/Entities/MenuButton/Factory.php
Строк: 37
<?php

namespace LongmanTelegramBotEntitiesMenuButton;

use 
LongmanTelegramBotEntitiesEntity;

class 
Factory extends LongmanTelegramBotEntitiesFactory
{
    public static function 
make(array $datastring $bot_username): Entity
    
{
        
$type = [
            
'commands' => MenuButtonCommands::class,
            
'web_app'  => MenuButtonWebApp::class,
            
'default'  => MenuButtonDefault::class,
        ];

        if (! isset(
$type[$data['type'] ?? ''])) {
            return new 
MenuButtonNotImplemented($data$bot_username);
        }

        
$class $type[$data['type']];
        return new 
$class($data$bot_username);
    }
}
Онлайн: 2
Реклама