PHP Class Frlnc\Slack\Core\Commander

Datei anzeigen Open project: frlnc/php-slack Class Usage Examples

Protected Properties

Property Type Description
$baseUrl string The base URL.
$commands array The commands.
$defaultHeaders array The default command headers.
$interactor Frlnc\Slack\Contracts\Http\Interactor The Http interactor.
$token string The API token.

Public Methods

Method Description
__construct ( string $token, Frlnc\Slack\Contracts\Http\Interactor $interactor )
execute ( string $command, array $parameters = [] ) : Frlnc\Slack\Contracts\Http\Response Executes a command.
format ( string $string ) : string Formats a string for Slack.
setToken ( string $token ) Sets the token.

Method Details

__construct() public method

public __construct ( string $token, Frlnc\Slack\Contracts\Http\Interactor $interactor )
$token string
$interactor Frlnc\Slack\Contracts\Http\Interactor

execute() public method

Executes a command.
public execute ( string $command, array $parameters = [] ) : Frlnc\Slack\Contracts\Http\Response
$command string
$parameters array
return Frlnc\Slack\Contracts\Http\Response

format() public static method

Formats a string for Slack.
public static format ( string $string ) : string
$string string
return string

setToken() public method

Sets the token.
public setToken ( string $token )
$token string

Property Details

$baseUrl protected_oe static_oe property

The base URL.
protected static string $baseUrl
return string

$commands protected_oe static_oe property

The commands.
protected static array $commands
return array

$defaultHeaders protected_oe static_oe property

The default command headers.
protected static array $defaultHeaders
return array

$interactor protected_oe property

The Http interactor.
protected Interactor,Frlnc\Slack\Contracts\Http $interactor
return Frlnc\Slack\Contracts\Http\Interactor

$token protected_oe property

The API token.
protected string $token
return string