add graphHandler

This commit is contained in:
_alvian 2017-12-22 13:55:09 +07:00
parent 183b2c6343
commit 858e86bfab

View File

@ -4,6 +4,7 @@ namespace explosivebit\arangodb;
use ArangoDBClient\EdgeHandler; use ArangoDBClient\EdgeHandler;
use ArangoDBClient\Export; use ArangoDBClient\Export;
use ArangoDBClient\GraphHandler;
use Yii; use Yii;
use ArangoDBClient\CollectionHandler; use ArangoDBClient\CollectionHandler;
use ArangoDBClient\ConnectionOptions; use ArangoDBClient\ConnectionOptions;
@ -46,6 +47,8 @@ class Connection extends BaseObject
private $documentHandler = null; private $documentHandler = null;
/** @var null|EdgeHandler $documentHandler */ /** @var null|EdgeHandler $documentHandler */
private $edgeHandler = null; private $edgeHandler = null;
/** @var null|EdgeHandler $graphHandler */
private $graphHandler = null;
public function init() public function init()
{ {
@ -59,6 +62,7 @@ class Connection extends BaseObject
$this->collectionHandler = new CollectionHandler($this->connection); $this->collectionHandler = new CollectionHandler($this->connection);
$this->documentHandler = new DocumentHandler($this->connection); $this->documentHandler = new DocumentHandler($this->connection);
$this->edgeHandler = new EdgeHandler($this->connection); $this->edgeHandler = new EdgeHandler($this->connection);
$this->graphHandler = new GraphHandler($this->connection);
Yii::endProfile($token, 'explosivebit\arangodb\Connection::open'); Yii::endProfile($token, 'explosivebit\arangodb\Connection::open');
} catch (\Exception $ex) { } catch (\Exception $ex) {
Yii::endProfile($token, 'explosivebit\arangodb\Connection::open'); 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 * @return null|CollectionHandler
*/ */