PHP 클래스 PHPDaemon\Core\AppResolver

저자: Vasily Zorin ([email protected])
상속: use trait PHPDaemon\Traits\ClassWatchdog, use trait PHPDaemon\Traits\StaticObjectWatchdog
파일 보기 프로젝트 열기: kakserpom/phpdaemon

공개 메소드들

메소드 설명
getAppFullName ( string $appName, string $instance = '' ) : string Resolve full name of application by its class and name
getInstance ( string $appName, string $instance = '', boolean $spawn = true, boolean $preload = false ) : object Gets instance of application
getInstanceByAppName ( string $appName, string $instance = '', boolean $spawn = true, boolean $preload = false ) : object Gets instance of application
getRequest ( object $req, object $upstream, string $responder = null ) : object Routes incoming request to related application
getRequestRoute ( object $req, object $upstream ) : string Routes incoming request to related application. Method is for overloading
preload ( boolean $privileged = false ) : void Preloads applications

메소드 상세

getAppFullName() 공개 메소드

Resolve full name of application by its class and name
public getAppFullName ( string $appName, string $instance = '' ) : string
$appName string Application name
$instance string Application class
리턴 string

getInstance() 공개 메소드

Gets instance of application
public getInstance ( string $appName, string $instance = '', boolean $spawn = true, boolean $preload = false ) : object
$appName string Application name
$instance string Instance name
$spawn boolean If true, we spawn an instance if absent
$preload boolean If true, worker is at the preload stage
리턴 object $instance AppInstance

getInstanceByAppName() 공개 메소드

Gets instance of application
public getInstanceByAppName ( string $appName, string $instance = '', boolean $spawn = true, boolean $preload = false ) : object
$appName string Application name
$instance string Instance name
$spawn boolean If true, we spawn an instance if absent
$preload boolean If true, worker is at the preload stage
리턴 object AppInstance

getRequest() 공개 메소드

Routes incoming request to related application
public getRequest ( object $req, object $upstream, string $responder = null ) : object
$req object Generic
$upstream object AppInstance of Upstream
$responder string
리턴 object Request

getRequestRoute() 공개 메소드

Routes incoming request to related application. Method is for overloading
public getRequestRoute ( object $req, object $upstream ) : string
$req object Generic
$upstream object AppInstance of Upstream
리턴 string Application's name

preload() 공개 메소드

Preloads applications
public preload ( boolean $privileged = false ) : void
$privileged boolean If true, we are in the pre-fork stage
리턴 void