public function transformResultToArray($receivedResult)
    {
        // transform object to array
        if (is_object($receivedResult)) {
            return json_decode(json_encode($receivedResult), true);
        // transform json string to array
        } else {
            return json_decode($receivedResult, true);
        }
    }
public function transformResultToArray($receivedResult)
    {
        // transform object to array
        if (is_object($receivedResult)) {
            return json_decode(json_encode($receivedResult), true);
        // transform json string to array
        } else {
            return json_decode($receivedResult, true);
        }
    }
public function transformResultToArray ( $ receivedResult ) { // transform object to array if ( is_object ( $ receivedResult ) ) { return json_decode ( json_encode ( $ receivedResult ) , true ) ; // transform json string to array } else { return json_decode ( $ receivedResult , true ) ; } }
Transforms server result to aray.

@param mixed $receivedResult
@return array
Transforms server result to aray .