forked from arangodb/arangodb-php
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
25 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,22 @@ | |||
<?php | |||
|
|||
namespace triagens\Avocado; | |||
|
|||
require dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'autoload.php'; | |||
|
|||
/* set up a trace function that will be called for each communication with the server */ | |||
$traceFunc = function($type, $data) { | |||
print "TRACE FOR ". $type . PHP_EOL; | |||
var_dump($data); | |||
}; | |||
|
|||
/* set up connection options */ | |||
$connectionOptions = array( | |||
ConnectionOptions::OPTION_PORT => 8529, // port to connect to | |||
ConnectionOptions::OPTION_HOST => "localhost", // host to connect to | |||
ConnectionOptions::OPTION_TIMEOUT => 3, // timeout in seconds | |||
ConnectionOptions::OPTION_TRACE => $traceFunc, // tracer function | |||
ConnectionOptions::OPTION_CREATE => false, // do not create unknown collections automatically | |||
ConnectionOptions::OPTION_UPDATE_POLICY => UpdatePolicy::LAST, // last update wins | |||
); | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters