Skip to content

Commit 70694bd

Browse files
committed
WS-3151: Tweak events example for negation.
1 parent 828e7d5 commit 70694bd

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

examples/events.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
echo 'Usage: php ' . __FILE__ . " --key <api_key> --url=<alternate_url>\n";
1414
exit();
1515
}
16-
$events_text_data = "I am looking for a flight to Los Angeles.";
16+
17+
$events_text_data = "Alice has a flight to Budapest. She has not booked a hotel.";
1718
$api = isset($options['url']) ? new Api($options['key'], $options['url']) : new Api($options['key']);
1819
$params = new DocumentParameters();
1920
$content = $events_text_data;
@@ -26,11 +27,11 @@
2627
error_log($e);
2728
}
2829

29-
// $api->setOption('negation', 'ONLY_NEGATIVE');
30-
// try {
31-
// $result = $api->events($params);
32-
// var_dump($result);
33-
// } catch (RosetteException $e) {
34-
// error_log($e);
35-
// }
30+
$api->setOption('negation', 'BOTH');
31+
try {
32+
$result = $api->events($params);
33+
var_dump($result);
34+
} catch (RosetteException $e) {
35+
error_log($e);
36+
}
3637

0 commit comments

Comments
 (0)