evaluate
Learn how to evaluate a CQL query.
This method evaluates a CQL query against the visitor’s context in real-time.
For more information, see Query evaluation.
Signature
This method has the following signature:
public function evaluate(string $query, ?EvaluationOptions $options = null): mixedThis method returns the result of the evaluation, whose type depends on the query. If the request fails and no fallback is set, it throws a CroctException.
Example
Here is a basic example of how to use this method:
<?phpuse Croct\Plug\Croct;
$croct = Croct::fromDotenv();$returning = $croct->evaluate('user is returning');Parameters
The following list describes the supported parameters: