Overview
  • Namespace
  • Class

Namespaces

  • Slack
    • Message

Classes

  • ApiClient
  • Bot
  • Channel
  • ClientObject
  • DataObject
  • DirectMessageChannel
  • Group
  • Payload
  • RealTimeClient
  • Team
  • User

Interfaces

  • ChannelInterface
  • Exception

Exceptions

  • ApiException
  • ConnectionException
  • UserNotFoundException

Class Payload

Stores incoming or outgoing message data for a Slack API call.

Slack\Payload implements ArrayAccess, JsonSerializable
Namespace: Slack
Located at Payload.php

Methods summary

public static Response
# fromJson( string $json )

Creates a response object from a JSON message.

Creates a response object from a JSON message.

Parameters

$json
A JSON string.

Returns

Response
The parsed response.
public
# __construct( array $data )

Creates a new payload object.

Creates a new payload object.

Parameters

$data
The payload data.
public array
# getData( )

Gets the payload data.

Gets the payload data.

Returns

array
The payload data.
public string
# toJson( )

Serializes the payload to a JSON message.

Serializes the payload to a JSON message.

Returns

string
A JSON message.
public
# offsetSet( mixed $offset, mixed $value )

Parameters

$offset
$value

Implementation of

ArrayAccess::offsetSet()
public boolean
# offsetExists( mixed $offset )

Parameters

$offset

Returns

boolean

Implementation of

ArrayAccess::offsetExists()
public
# offsetUnset( mixed $offset )

Parameters

$offset

Implementation of

ArrayAccess::offsetUnset()
public null
# offsetGet( mixed $offset )

Parameters

$offset

Returns

null

Implementation of

ArrayAccess::offsetGet()
public array
# jsonSerialize( )

Returns

array

Implementation of

JsonSerializable::jsonSerialize()
public string
# __toString( )

Returns

string

Properties summary

protected array $data

The response data.

The response data.

#
API documentation generated by ApiGen