Nexus API Reference

WebSocketRoute
in package

Read onlyYes
FinalYes
Tags
psalm-api

Table of Contents

Constants

MODE_CHANNEL  = 'channel'
MODE_HANDLER  = 'handler'

Properties

$channelFactory  : Closure|null
$keyFrom  : string|null
$mode  : string
$path  : string
$targetClass  : string

Methods

__construct()  : mixed
channel()  : self
handler()  : self

Constants

Properties

Methods

__construct()

public __construct(string $mode, string $path, class-string $targetClass, string|null $keyFrom[, callable(): WebSocketChannelActor|null $channelFactory = null ]) : mixed
Parameters
$mode : string
$path : string
$targetClass : class-string
$keyFrom : string|null
$channelFactory : callable(): WebSocketChannelActor|null = null

Optional custom factory for channel actors that need constructor-injected dependencies. When null, the dispatcher calls new $actorClass() (zero-arg construction).

channel()

public static channel(string $path, class-string $actorClass, string $keyFrom[, callable(): WebSocketChannelActor|null $factory = null ]) : self
Parameters
$path : string
$actorClass : class-string
$keyFrom : string
$factory : callable(): WebSocketChannelActor|null = null
Return values
self

handler()

public static handler(string $path, class-string $handlerClass) : self
Parameters
$path : string
$handlerClass : class-string
Return values
self

        
On this page

Search results