classes/phing/tasks/ext/WikiPublishTask.php
private function checkApiResponseResult($action, $response, $expect = 'Success')
    {
        if (isset($response['error'])) {
            throw new BuildException(
                'Wiki response error (action: ' . $action . ', error code: ' . $response['error']['code'] . ')'
            );
        }
        if (false == isset($response[$action]) || false == isset($response[$action]['result'])) {
            throw new BuildException('Wiki response result not found (action: ' . $action . ')');
        }
        if ($response[$action]['result'] !== $expect) {
            throw new BuildException(
                'Unexpected Wiki response result ' . $response[$action]['result'] . ' (expected: ' . $expect . ')'
            );
        }
    }
private function checkApiResponseResult($action, $response, $expect = 'Success')
    {
        if (isset($response['error'])) {
            throw new BuildException(
                'Wiki response error (action: ' . $action . ', error code: ' . $response['error']['code'] . ')'
            );
        }
        if (false == isset($response[$action]) || false == isset($response[$action]['result'])) {
            throw new BuildException('Wiki response result not found (action: ' . $action . ')');
        }
        if ($response[$action]['result'] !== $expect) {
            throw new BuildException(
                'Unexpected Wiki response result ' . $response[$action]['result'] . ' (expected: ' . $expect . ')'
            );
        }
    }
private function checkApiResponseResult ( $ action , $ response , $ expect = 'Success' ) { if ( isset ( $ response [ 'error' ] ) ) { throw new BuildException ( 'Wiki response error (action: ' . $ action . ', error code: ' . $ response [ 'error' ] [ 'code' ] . ')' ) ; } if ( false == isset ( $ response [ $ action ] ) || false == isset ( $ response [ $ action ] [ 'result' ] ) ) { throw new BuildException ( 'Wiki response result not found (action: ' . $ action . ')' ) ; } if ( $ response [ $ action ] [ 'result' ] !== $ expect ) { throw new BuildException ( 'Unexpected Wiki response result ' . $ response [ $ action ] [ 'result' ] . ' (expected: ' . $ expect . ')' ) ; } }
Validate Wiki webapi response

@param string $action
@param array $response
@param string $expect

@throws BuildException
Validate Wiki webapi response