0

I have function like this in my class

public function browseNodeLookup($nodeId)
  {
    return $this->returnData(
      $this->performSoapRequest("BrowseNodeLookup", $params)
    );
  }

I'm using it like this

$response = $amazonEcs->browseNodeLookup($node);
var_dump($response);

Now the object var_dump looks like this

object(SoapFault)#279 (10) {
  ["message":protected]=>
  string(178) "The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details."
  }

I would like to echo that message. can someone tell me how?

I have tried like this

echo $response->message;

But i'm getting error since it is protected.

hakre
  • 193,403
  • 52
  • 435
  • 836
PrivateUser
  • 4,474
  • 12
  • 61
  • 94

1 Answers1

7

Use $response->getMessage() instead of $response->message because message is a protected property :)

Surinder ツ
  • 1,778
  • 3
  • 16
  • 27