From c4c9b29e8828789e888ebc6d4d2606c9272297b1 Mon Sep 17 00:00:00 2001 From: _alvian Date: Tue, 3 Oct 2017 06:20:15 +0700 Subject: [PATCH] enhance connection based on new class in arangodb php --- Connection.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Connection.php b/Connection.php index 8b4fb08..4ce3d20 100644 --- a/Connection.php +++ b/Connection.php @@ -4,7 +4,8 @@ namespace explosivebit\arangodb; use Yii; use triagens\ArangoDb\CollectionHandler; -use triagens\ArangoDb\ConnectionOptions; +//use triagens\ArangoDb\ConnectionOptions; +use ArangoDBClient\ConnectionOptions; use triagens\ArangoDb\Document; use triagens\ArangoDb\DocumentHandler; use triagens\ArangoDb\Statement; @@ -51,9 +52,9 @@ class Connection extends Object try { Yii::info($token, 'explosivebit\arangodb\Connection::open'); Yii::beginProfile($token, 'explosivebit\arangodb\Connection::open'); - $this->connection = new \triagens\ArangoDb\Connection($this->connectionOptions); - $this->collectionHandler = new CollectionHandler($this->connection); - $this->documentHandler = new DocumentHandler($this->connection); + $this->connection = new \ArangoDBClient\Connection($this->connectionOptions); + $this->collectionHandler = new \ArangoDBClient\CollectionHandler($this->connection); + $this->documentHandler = new \ArangoDBClient\DocumentHandler($this->connection); Yii::endProfile($token, 'explosivebit\arangodb\Connection::open'); } catch (\Exception $ex) { Yii::endProfile($token, 'explosivebit\arangodb\Connection::open'); @@ -102,6 +103,6 @@ class Connection extends Object */ public function getStatement($options = []) { - return new Statement($this->connection, $options); + return new \ArangoDBClient\Statement($this->connection, $options); } }