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 Channel

Represents a single Slack channel.

Slack\DataObject implements JsonSerializable
Extended by Slack\ClientObject
Extended by Slack\Channel implements Slack\ChannelInterface

Direct known subclasses

Slack\Group

Namespace: Slack
Located at Channel.php

Methods summary

public string
# getId( )

Gets the room ID.

Gets the room ID.

Returns

string
The room ID.

Implementation of

Slack\ChannelInterface::getId()
public string
# getName( )

Gets the channel name.

Gets the channel name.

Returns

string
The name of the channel.
public string
# getPurpose( )

Gets the channel's purpose text.

Gets the channel's purpose text.

Returns

string
The channel's purpose text.
public string
# getTopic( )

Gets the channel topic text.

Gets the channel topic text.

Returns

string
The channel's topic text.
public React\Promise\PromiseInterface
# getMembers( )

Gets an iterator over all users in the channel.

Gets an iterator over all users in the channel.

Returns

React\Promise\PromiseInterface

A promise for an array of user objects for each member in the channel.

public DateTime
# getTimeCreated( )

Gets the time the channel was created.

Gets the time the channel was created.

Returns

DateTime
The time the channel was created.
public React\Promise\PromiseInterface
# getCreator( )

Gets the creator of the channel.

Gets the creator of the channel.

Returns

React\Promise\PromiseInterface
The user who created the channel.
public integer
# getUnreadCount( )

Gets the number of message unread by the authenticated user.

Gets the number of message unread by the authenticated user.

Returns

integer
The number of unread messages.
public boolean
# isArchived( )

Checks if the channel has been archived.

Checks if the channel has been archived.

Returns

boolean
True if the channel has been archived, otherwise false.
public React\Promise\PromiseInterface
# rename( string $name )

Renames the channel.

Renames the channel.

Parameters

$name
The name to set to.

Returns

React\Promise\PromiseInterface
public React\Promise\PromiseInterface
# setPurpose( string $text )

Sets the channel's purpose text.

Sets the channel's purpose text.

Parameters

$text
The new purpose text to set to.

Returns

React\Promise\PromiseInterface
public React\Promise\PromiseInterface
# setTopic( string $text )

Sets the channel topic text.

Sets the channel topic text.

Parameters

$text
The new topic text to set to.

Returns

React\Promise\PromiseInterface
public React\Promise\PromiseInterface
# archive( )

Archives the channel.

Archives the channel.

Returns

React\Promise\PromiseInterface
public React\Promise\PromiseInterface
# unarchive( )

Un-archives the channel.

Un-archives the channel.

Returns

React\Promise\PromiseInterface
public React\Promise\PromiseInterface
# inviteUser( Slack\User $user )

Invites a user to the channel.

Invites a user to the channel.

Parameters

$user
user to invite.

Returns

React\Promise\PromiseInterface
public React\Promise\PromiseInterface
# kickUser( Slack\User $user )

Kicks a user from the channel.

Kicks a user from the channel.

Parameters

$user
user to kick.

Returns

React\Promise\PromiseInterface
public
# close( )

Implementation of

Slack\ChannelInterface::close()

Methods inherited from Slack\ClientObject

__construct(), getClient()

Methods inherited from Slack\DataObject

fromData(), jsonSerialize(), jsonUnserialize()

Properties summary

Properties inherited from Slack\ClientObject

$client

Properties inherited from Slack\DataObject

$data

API documentation generated by ApiGen