private function _responseFailHandle($error, $index)
    {
        $cbk = $this->requestList[$index]->getFailCallbackList();
        if (! empty($cbk)) {
            $error = array_reduce($cbk, function ($prev, $cb) {
                return $cb($prev);
            }, $error);
        }
        $response = new SimpleResponse();
        $response->setFail($error);
        $this->requestList[$index]->setResponse($response);
    }
private function _responseFailHandle($error, $index)
    {
        $cbk = $this->requestList[$index]->getFailCallbackList();
        if (! empty($cbk)) {
            $error = array_reduce($cbk, function ($prev, $cb) {
                return $cb($prev);
            }, $error);
        }
        $response = new SimpleResponse();
        $response->setFail($error);
        $this->requestList[$index]->setResponse($response);
    }
private function _responseFailHandle ( $ error , $ index ) { $ cbk = $ this -> requestList [ $ index ] -> getFailCallbackList ( ) ; if ( ! empty ( $ cbk ) ) { $ error = array_reduce ( $ cbk , function ( $ prev , $ cb ) { return $ cb ( $ prev ) ; } , $ error ) ; } $ response = new SimpleResponse ( ) ; $ response -> setFail ( $ error ) ; $ this -> requestList [ $ index ] -> setResponse ( $ response ) ; }
when request failed this method will be called
@param mixed $error
@param int $index
when request failed this method will be called