protected function process(array $requestParams)
    {
        $request = new ExtDirectRequest($this->useCache(), $this->getApplicationPath(), $this->getApplicationNameSpace());
        $response = new ExtDirectResponse();
        $requestParameters = new Parameters();

        try {
            // parameter validation here
            $request->setApplicationPath($this->getApplicationPath());
            $requestParameters->setParameters($requestParams);

            // inject parameters instance into request and response object to get access to all relevant params
            $request->injectParameters($requestParameters);
            $response->injectParameters($requestParameters);

            $request->injectResponse($response);

            $request->setParamMethod($this->getParamMethod());
            $request->setMethodCalls($this->getMethodsToCall());

            $request->run();

        } catch (ExtDirectApplicationException $e) {
            $result = $e->getResponse();

            if (!empty($result)) {
                $response->setResult(array("success" => false, "message" => $e->getMessage(), "actions" => $result));
            } else {
                $response->setResult(array("success" => false, "message" => $e->getMessage()));
            }

        } catch (\Exception $e) {
            $response->setResult(array("success" => false, "message" => $e->getMessage()));
        }

        return $response;
    }
protected function process(array $requestParams)
    {
        $request = new ExtDirectRequest($this->useCache(), $this->getApplicationPath(), $this->getApplicationNameSpace());
        $response = new ExtDirectResponse();
        $requestParameters = new Parameters();

        try {
            // parameter validation here
            $request->setApplicationPath($this->getApplicationPath());
            $requestParameters->setParameters($requestParams);

            // inject parameters instance into request and response object to get access to all relevant params
            $request->injectParameters($requestParameters);
            $response->injectParameters($requestParameters);

            $request->injectResponse($response);

            $request->setParamMethod($this->getParamMethod());
            $request->setMethodCalls($this->getMethodsToCall());

            $request->run();

        } catch (ExtDirectApplicationException $e) {
            $result = $e->getResponse();

            if (!empty($result)) {
                $response->setResult(array("success" => false, "message" => $e->getMessage(), "actions" => $result));
            } else {
                $response->setResult(array("success" => false, "message" => $e->getMessage()));
            }

        } catch (\Exception $e) {
            $response->setResult(array("success" => false, "message" => $e->getMessage()));
        }

        return $response;
    }
protected function process ( array $ requestParams ) { $ request = new ExtDirectRequest ( $ this -> useCache ( ) , $ this -> getApplicationPath ( ) , $ this -> getApplicationNameSpace ( ) ) ; $ response = new ExtDirectResponse ( ) ; $ requestParameters = new Parameters ( ) ; try { // parameter validation here $ request -> setApplicationPath ( $ this -> getApplicationPath ( ) ) ; $ requestParameters -> setParameters ( $ requestParams ) ; // inject parameters instance into request and response object to get access to all relevant params $ request -> injectParameters ( $ requestParameters ) ; $ response -> injectParameters ( $ requestParameters ) ; $ request -> injectResponse ( $ response ) ; $ request -> setParamMethod ( $ this -> getParamMethod ( ) ) ; $ request -> setMethodCalls ( $ this -> getMethodsToCall ( ) ) ; $ request -> run ( ) ; } catch ( ExtDirectApplicationException $ e ) { $ result = $ e -> getResponse ( ) ; if ( ! empty ( $ result ) ) { $ response -> setResult ( array ( "success" => false , "message" => $ e -> getMessage ( ) , "actions" => $ result ) ) ; } else { $ response -> setResult ( array ( "success" => false , "message" => $ e -> getMessage ( ) ) ) ; } } catch ( \ Exception $ e ) { $ response -> setResult ( array ( "success" => false , "message" => $ e -> getMessage ( ) ) ) ; } return $ response ; }
process a single ext direct request

@param array $requestParams the ext direct request as array

@return array
process a single ext direct request