public function getRequest($req, $upstream, $responder = null)
    {
        if (isset($req->attrs->server['APPNAME'])) {
            $appName = $req->attrs->server['APPNAME'];
        } elseif ($responder !== null) {
            $appName = $responder;
        } elseif (($appName = $this->getRequestRoute($req, $upstream)) !== null) {
            if ($appName === false) {
                return $req;
            }
        } else {
            return $req;
        }
        if (mb_orig_strpos($appName, ':') === false) {
            $appName .= ':';
        }
        list($app, $instance) = explode(':', $appName, 2);

        $appInstance = $this->getInstanceByAppName($app, $instance);

        if (!$appInstance) {
            return $req;
        }

        return $appInstance->handleRequest($req, $upstream);
    }
public function getRequest($req, $upstream, $responder = null)
    {
        if (isset($req->attrs->server['APPNAME'])) {
            $appName = $req->attrs->server['APPNAME'];
        } elseif ($responder !== null) {
            $appName = $responder;
        } elseif (($appName = $this->getRequestRoute($req, $upstream)) !== null) {
            if ($appName === false) {
                return $req;
            }
        } else {
            return $req;
        }
        if (mb_orig_strpos($appName, ':') === false) {
            $appName .= ':';
        }
        list($app, $instance) = explode(':', $appName, 2);

        $appInstance = $this->getInstanceByAppName($app, $instance);

        if (!$appInstance) {
            return $req;
        }

        return $appInstance->handleRequest($req, $upstream);
    }
public function getRequest ( $ req , $ upstream , $ responder = null ) { if ( isset ( $ req -> attrs -> server [ 'APPNAME' ] ) ) { $ appName = $ req -> attrs -> server [ 'APPNAME' ] ; } elseif ( $ responder !== null ) { $ appName = $ responder ; } elseif ( ( $ appName = $ this -> getRequestRoute ( $ req , $ upstream ) ) !== null ) { if ( $ appName === false ) { return $ req ; } } else { return $ req ; } if ( mb_orig_strpos ( $ appName , ':' ) === false ) { $ appName .= ':' ; } list ( $ app , $ instance ) = explode ( ':' , $ appName , 2 ) ; $ appInstance = $ this -> getInstanceByAppName ( $ app , $ instance ) ; if ( ! $ appInstance ) { return $ req ; } return $ appInstance -> handleRequest ( $ req , $ upstream ) ; }
Routes incoming request to related application
@param  object $req Generic
@param  object $upstream AppInstance of Upstream
@param  string $responder
@return object Request
Routes incoming request to related application