From 858e86bfab9948c752ac5876e6a386ae082e1192 Mon Sep 17 00:00:00 2001 From: _alvian Date: Fri, 22 Dec 2017 13:55:09 +0700 Subject: [PATCH] add graphHandler --- Connection.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Connection.php b/Connection.php index b68c6aa..a99708c 100644 --- a/Connection.php +++ b/Connection.php @@ -4,6 +4,7 @@ namespace explosivebit\arangodb; use ArangoDBClient\EdgeHandler; use ArangoDBClient\Export; +use ArangoDBClient\GraphHandler; use Yii; use ArangoDBClient\CollectionHandler; use ArangoDBClient\ConnectionOptions; @@ -46,6 +47,8 @@ class Connection extends BaseObject private $documentHandler = null; /** @var null|EdgeHandler $documentHandler */ private $edgeHandler = null; + /** @var null|EdgeHandler $graphHandler */ + private $graphHandler = null; public function init() { @@ -59,6 +62,7 @@ class Connection extends BaseObject $this->collectionHandler = new CollectionHandler($this->connection); $this->documentHandler = new DocumentHandler($this->connection); $this->edgeHandler = new EdgeHandler($this->connection); + $this->graphHandler = new GraphHandler($this->connection); Yii::endProfile($token, 'explosivebit\arangodb\Connection::open'); } catch (\Exception $ex) { Yii::endProfile($token, 'explosivebit\arangodb\Connection::open'); @@ -66,6 +70,14 @@ class Connection extends BaseObject } } + /** + * @return EdgeHandler|null + */ + public function getGraphHandler(): EdgeHandler + { + return $this->graphHandler; + } + /** * @return null|CollectionHandler */