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?

heohni
Hi,

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 https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
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 https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.