cakephp 3 - return object data from a function?

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

cakephp 3 - return object data from a function?


I am very new to cake 3 and get stuck within the first steps :-)
I am calling a soap api to validate IBAN numbers.

$this->client = $this->soap();
$params = array('iban' => $iban);
$result = $this->client->validateIban($params);

it works fine, I can debug() the results and get the right data.
To work with this data I need to return the result, bit get this error:

return $result->validateIban;

Controller action can only return an instance of Response            

$result->validateIban ist a string like 'true' or 'false'.
What is the right way to return the result?

Thanks so much for help!!

Like Us on FaceBook
Find us on Twitter

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at
For more options, visit