Overview

Namespaces

  • Evenement
  • None
  • PHP
  • Psr
    • Http
      • Message
  • Ratchet
    • Http
    • RFC6455
      • Handshake
      • Messaging
    • Server
    • Session
      • Serialize
      • Storage
        • Proxy
    • Wamp
    • WebSocket
  • React
    • EventLoop
      • Tick
      • Timer
    • Socket
    • Stream
  • Symfony
    • Component
      • HttpFoundation
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
      • Routing
        • Annotation
        • Exception
        • Generator
          • Dumper
        • Loader
          • DependencyInjection
        • Matcher
          • Dumper
        • Tests
          • Annotation
          • Fixtures
            • AnnotatedClasses
            • OtherAnnotatedClasses
          • Generator
            • Dumper
          • Loader
          • Matcher
            • Dumper

Classes

  • ServerProtocol
  • Topic
  • TopicManager
  • WampConnection
  • WampServer

Interfaces

  • WampServerInterface

Exceptions

  • Exception
  • JsonException
  • Overview
  • Namespace
  • Class
  • Tree

Class Topic

A topic/channel containing connections that have subscribed to it

Ratchet\Wamp\Topic implements IteratorAggregate, Countable
Namespace: Ratchet\Wamp
Located at Ratchet/Wamp/Topic.php
Methods summary
public
# __construct( string $topicId )

Parameters

$topicId
string
$topicId Unique ID for this object
public string
# getId( )

Returns

string
public
# __toString( )
public Ratchet\Wamp\Topic
# broadcast( string $msg, array $exclude = array(), array $eligible = array() )

Send a message to all the connections in this topic

Send a message to all the connections in this topic

Parameters

$msg
string
$msg Payload to publish
$exclude
array
$exclude A list of session IDs the message should be excluded from (blacklist)
$eligible
array
$eligible A list of session Ids the message should be send to (whitelist)

Returns

Ratchet\Wamp\Topic
The same Topic object to chain
public boolean
# has( Ratchet\ConnectionInterface $conn )

Parameters

$conn
Ratchet\Wamp\WampConnection
$conn

Returns

boolean
public Ratchet\Wamp\Topic
# add( Ratchet\ConnectionInterface $conn )

Parameters

$conn
Ratchet\Wamp\WampConnection
$conn

Returns

Ratchet\Wamp\Topic
public Ratchet\Wamp\Topic
# remove( Ratchet\ConnectionInterface $conn )

Parameters

$conn
Ratchet\Wamp\WampConnection
$conn

Returns

Ratchet\Wamp\Topic
public
# getIterator( )

Implementation of

IteratorAggregate::getIterator()
public
# count( )

Implementation of

Countable::count()
Ratchet API documentation generated by ApiGen 2.8.0