PHP Class PHPDaemon\SockJS\Application

Author: Vasily Zorin ([email protected])
Inheritance: extends PHPDaemon\Core\AppInstance
Afficher le fichier Open project: kakserpom/phpdaemon

Méthodes publiques

Свойство Type Description
$wss

Protected Properties

Свойство Type Description
$redis
$sessions

Méthodes publiques

Méthode Description
attachWss ( Pool $wss ) : boolean attachWss
beginRequest ( object $req, object $upstream ) : object Creates Request.
beginSession ( string $path, string $sessId, string $server ) : object beginSession
callMethod ( string $method, object $req, object $upstream ) : object callMethod
detachWss ( object $wss ) : boolean detachWss
endSession ( Session $session ) : void endSession
expire ( string $key, integer $seconds, callable $cb = null ) : void expire
getLocalSubscribersCount ( string $chan ) : integer getLocalSubscribersCount
getRouteOptions ( string $path ) : array getRouteOptions
getkey ( string $key, callable $cb = null ) : void getkey
onFinish ( ) : void onFinish
onReady ( ) : void Called when the worker is ready to go
publish ( string $chan, callable $cb, callable $opcb = null ) : void publish
setRedis ( Pool $redis ) Set Redis instance
setkey ( string $key, mixed $value, callable $cb = null ) : void setkey
setnx ( string $key, mixed $value, callable $cb = null ) : void setnx
subscribe ( string $chan, callable $cb, callable $opcb = null ) : void subscribe
unsubscribe ( string $chan, callable $cb, callable $opcb = null ) : void unsubscribe
unsubscribeReal ( string $chan, callable $opcb = null ) : void unsubscribeReal
wsHandler ( object $ws, string $path, object $client, callable $state ) : boolean wsHandler

Méthodes protégées

Méthode Description
getConfigDefaults ( ) : array | boolean Setting default config options

Method Details

attachWss() public méthode

attachWss
public attachWss ( Pool $wss ) : boolean
$wss PHPDaemon\Network\Pool
Résultat boolean

beginRequest() public méthode

Creates Request.
public beginRequest ( object $req, object $upstream ) : object
$req object Request.
$upstream object Upstream application instance.
Résultat object Request.

beginSession() public méthode

beginSession
public beginSession ( string $path, string $sessId, string $server ) : object
$path string [@todo description]
$sessId string [@todo description]
$server string [@todo description]
Résultat object

callMethod() public méthode

callMethod
public callMethod ( string $method, object $req, object $upstream ) : object
$method string [@todo description]
$req object [@todo description]
$upstream object [@todo description]
Résultat object

detachWss() public méthode

detachWss
public detachWss ( object $wss ) : boolean
$wss object [@todo description]
Résultat boolean

endSession() public méthode

endSession
public endSession ( Session $session ) : void
$session Session
Résultat void

expire() public méthode

expire
public expire ( string $key, integer $seconds, callable $cb = null ) : void
$key string [@todo description]
$seconds integer [@todo description]
$cb callable [@todo description]
Résultat void

getConfigDefaults() protected méthode

Setting default config options
protected getConfigDefaults ( ) : array | boolean
Résultat array | boolean

getLocalSubscribersCount() public méthode

getLocalSubscribersCount
public getLocalSubscribersCount ( string $chan ) : integer
$chan string
Résultat integer

getRouteOptions() public méthode

getRouteOptions
public getRouteOptions ( string $path ) : array
$path string [@todo description]
Résultat array

getkey() public méthode

getkey
public getkey ( string $key, callable $cb = null ) : void
$key string [@todo description]
$cb callable [@todo description]
Résultat void

onFinish() public méthode

onFinish
public onFinish ( ) : void
Résultat void

onReady() public méthode

Called when the worker is ready to go
public onReady ( ) : void
Résultat void

publish() public méthode

publish
public publish ( string $chan, callable $cb, callable $opcb = null ) : void
$chan string [@todo description]
$cb callable [@todo description]
$opcb callable [@todo description]
Résultat void

setRedis() public méthode

Set Redis instance
public setRedis ( Pool $redis )
$redis PHPDaemon\Clients\Redis\Pool

setkey() public méthode

setkey
public setkey ( string $key, mixed $value, callable $cb = null ) : void
$key string [@todo description]
$value mixed [@todo description]
$cb callable [@todo description]
Résultat void

setnx() public méthode

setnx
public setnx ( string $key, mixed $value, callable $cb = null ) : void
$key string [@todo description]
$value mixed [@todo description]
$cb callable [@todo description]
Résultat void

subscribe() public méthode

subscribe
public subscribe ( string $chan, callable $cb, callable $opcb = null ) : void
$chan string [@todo description]
$cb callable [@todo description]
$opcb callable [@todo description]
Résultat void

unsubscribe() public méthode

unsubscribe
public unsubscribe ( string $chan, callable $cb, callable $opcb = null ) : void
$chan string [@todo description]
$cb callable [@todo description]
$opcb callable [@todo description]
Résultat void

unsubscribeReal() public méthode

unsubscribeReal
public unsubscribeReal ( string $chan, callable $opcb = null ) : void
$chan string [@todo description]
$opcb callable [@todo description]
Résultat void

wsHandler() public méthode

wsHandler
public wsHandler ( object $ws, string $path, object $client, callable $state ) : boolean
$ws object [@todo description]
$path string [@todo description]
$client object [@todo description]
$state callable [@todo description]
Résultat boolean

Property Details

$redis protected_oe property

protected $redis

$sessions protected_oe property

protected $sessions

$wss public_oe property

public $wss