src/Currency/Output/Processor.php
public function process(\Controller $controller, $result = null)
    {
        if ($controller->getRequest()->isAjax()) {
            $response = $controller->getResponse();
            $response->setStatusCode(200);

            if (is_array($result)) {
                $response->addHeader('Content-Type', 'application/json');
                $response->setBody(json_encode($result));
            }

            return $response;
        } else {
            $controller->redirectBack();
        }

        return null;
    }
public function process(\Controller $controller, $result = null)
    {
        if ($controller->getRequest()->isAjax()) {
            $response = $controller->getResponse();
            $response->setStatusCode(200);

            if (is_array($result)) {
                $response->addHeader('Content-Type', 'application/json');
                $response->setBody(json_encode($result));
            }

            return $response;
        } else {
            $controller->redirectBack();
        }

        return null;
    }
public function process ( \ Controller $ controller , $ result = null ) { if ( $ controller -> getRequest ( ) -> isAjax ( ) ) { $ response = $ controller -> getResponse ( ) ; $ response -> setStatusCode ( 200 ) ; if ( is_array ( $ result ) ) { $ response -> addHeader ( 'Content-Type' , 'application/json' ) ; $ response -> setBody ( json_encode ( $ result ) ) ; } return $ response ; } else { $ controller -> redirectBack ( ) ; } return null ; }
Method used to determine how to handle the output based on the InputProcessor's result
@param  \Controller $controller
@param  array|void $result
@return \SS_HTTPResponse
Method used to determine how to handle the output based on the InputProcessor s result