PHP 클래스 Telegram\Bot\BotsManager

파일 보기 프로젝트 열기: irazasyed/telegram-bot-sdk

보호된 프로퍼티들

프로퍼티 타입 설명
$bots Api[] The active bot instances.
$config array The config instance.
$container Illuminate\Contracts\Container\Container The container instance.

공개 메소드들

메소드 설명
__call ( string $method, array $parameters ) : mixed Magically pass methods to the default bot.
__construct ( array $config ) TelegramManager constructor.
bot ( string $name = null ) : Api Get a bot instance.
disconnect ( string $name = null ) : void Disconnect from the given bot.
getBotConfig ( string | null $name = null ) : array Get the configuration for a bot.
getBots ( ) : Api[] Return all of the created bots.
getConfig ( string $key, mixed $default = null ) : mixed Get the specified configuration value for Telegram.
getDefaultBot ( ) : string Get the default bot name.
reconnect ( string $name = null ) : Api Reconnect to the given bot.
setContainer ( Illuminate\Contracts\Container\Container $container ) Set the IoC Container.
setDefaultBot ( string $name ) Set the default bot name.

보호된 메소드들

메소드 설명
deduplicateArray ( array $array ) : array De-duplicate an array.
makeBot ( string $name ) : Api Make the bot instance.
parseBotCommands ( array $commands ) : array Builds the list of commands for the given commands array.
parseCommands ( array $commands ) : array Parse an array of commands and build a list.

메소드 상세

__call() 공개 메소드

Magically pass methods to the default bot.
public __call ( string $method, array $parameters ) : mixed
$method string
$parameters array
리턴 mixed

__construct() 공개 메소드

TelegramManager constructor.
public __construct ( array $config )
$config array

bot() 공개 메소드

Get a bot instance.
public bot ( string $name = null ) : Api
$name string
리턴 Api

deduplicateArray() 보호된 메소드

De-duplicate an array.
protected deduplicateArray ( array $array ) : array
$array array
리턴 array

disconnect() 공개 메소드

Disconnect from the given bot.
public disconnect ( string $name = null ) : void
$name string
리턴 void

getBotConfig() 공개 메소드

Get the configuration for a bot.
public getBotConfig ( string | null $name = null ) : array
$name string | null
리턴 array

getBots() 공개 메소드

Return all of the created bots.
public getBots ( ) : Api[]
리턴 Api[]

getConfig() 공개 메소드

Get the specified configuration value for Telegram.
public getConfig ( string $key, mixed $default = null ) : mixed
$key string
$default mixed
리턴 mixed

getDefaultBot() 공개 메소드

Get the default bot name.
public getDefaultBot ( ) : string
리턴 string

makeBot() 보호된 메소드

Make the bot instance.
protected makeBot ( string $name ) : Api
$name string
리턴 Api

parseBotCommands() 보호된 메소드

Builds the list of commands for the given commands array.
protected parseBotCommands ( array $commands ) : array
$commands array
리턴 array An array of commands which includes global and bot specific commands.

parseCommands() 보호된 메소드

Parse an array of commands and build a list.
protected parseCommands ( array $commands ) : array
$commands array
리턴 array

reconnect() 공개 메소드

Reconnect to the given bot.
public reconnect ( string $name = null ) : Api
$name string
리턴 Api

setContainer() 공개 메소드

Set the IoC Container.
public setContainer ( Illuminate\Contracts\Container\Container $container )
$container Illuminate\Contracts\Container\Container Container instance

setDefaultBot() 공개 메소드

Set the default bot name.
public setDefaultBot ( string $name )
$name string

프로퍼티 상세

$bots 보호되어 있는 프로퍼티

The active bot instances.
protected Api[],Telegram\Bot $bots
리턴 Api[]

$config 보호되어 있는 프로퍼티

The config instance.
protected array $config
리턴 array

$container 보호되어 있는 프로퍼티

The container instance.
protected Container,Illuminate\Contracts\Container $container
리턴 Illuminate\Contracts\Container\Container