-
Notifications
You must be signed in to change notification settings - Fork 3
Response Helper methods
Dominik Brader edited this page Apr 10, 2019
·
1 revision
As a counterpart to all other methods in the respective Response
objects, helper methods do not return a value that was returned by FINDOLOGIC. Usually they have some logic behind them that checks for existence/value of properties.
As a small example we have the method getAlternativeQuery
, which will return a different value based on if the didYouMeanQuery
is set or not.
// ...initialization...
// ...setting of parameters and sending the request...
/** @var XmlResponse $xmlResponse */
echo $xmlResponse->getQuery()->getAlternativeQuery();
// If the response has a didYouMeanQuery set, this one will be the didYouMeanQuery.
// Otherwise the value of the queryString is returned.
Documentation is up to date with version:
Version v1.x