SubscriptionManagerInterface
Resource subscription interface.
Tags
Table of Contents
Methods
- isSubscribed() : bool
- Check if a session is subscribed to a resource URI.
- notifyResourceChanged() : void
- Notifies all sessions subscribed to the given resource URI that the resource has changed. Sends a ResourceUpdatedNotification for each subscriber.
- subscribe() : void
- Subscribes a session to a specific resource URI.
- unsubscribe() : void
- Unsubscribes a session from a specific resource URI.
Methods
isSubscribed()
Check if a session is subscribed to a resource URI.
public
isSubscribed(SessionInterface $session, string $uri) : bool
Parameters
- $session : SessionInterface
- $uri : string
Tags
Return values
boolnotifyResourceChanged()
Notifies all sessions subscribed to the given resource URI that the resource has changed. Sends a ResourceUpdatedNotification for each subscriber.
public
notifyResourceChanged(Protocol $protocol, SessionInterface $session, string $uri) : void
Parameters
- $protocol : Protocol
- $session : SessionInterface
- $uri : string
Tags
subscribe()
Subscribes a session to a specific resource URI.
public
subscribe(SessionInterface $session, string $uri) : void
Parameters
- $session : SessionInterface
- $uri : string
Tags
unsubscribe()
Unsubscribes a session from a specific resource URI.
public
unsubscribe(SessionInterface $session, string $uri) : void
Parameters
- $session : SessionInterface
- $uri : string