diff --git a/ArangoDbConnection.php b/ArangoDbConnection.php index 0922f24..37d7d76 100644 --- a/ArangoDbConnection.php +++ b/ArangoDbConnection.php @@ -6,7 +6,7 @@ use yii\helpers\ArrayHelper; use yii\base\Object; // set up some aliases for less typing later -use triagens\ArangoDb\Connection as ArangoConnection; + use triagens\ArangoDb\ConnectionOptions as ArangoConnectionOptions; use triagens\ArangoDb\DocumentHandler as ArangoDocumentHandler; @@ -53,7 +53,7 @@ class ArangoDbConnection extends Object { { parent::init(); - $this->_connection = new ArangoConnection($this->connectionOptions); + $this->_connection = new Connection($this->connectionOptions); $this->_collectionHandler = new \triagens\ArangoDb\CollectionHandler($this->_connection); $this->_documentHandler = new \triagens\ArangoDb\DocumentHandler($this->_connection); } diff --git a/Connection.php b/Connection.php new file mode 100644 index 0000000..1868ea1 --- /dev/null +++ b/Connection.php @@ -0,0 +1,19 @@ +getOption(ConnectionOptions::OPTION_CHECK_UTF8_CONFORM) === true) { + self::check_encoding($data); + } + + + $response = json_encode($data, $options | JSON_FORCE_OBJECT); + + return $response; + } +} \ No newline at end of file