Skip to content

Instantly share code, notes, and snippets.

@ikwattro
Last active August 29, 2015 14:06
Show Gist options
  • Save ikwattro/5c201592a055d70d5dfe to your computer and use it in GitHub Desktop.
Save ikwattro/5c201592a055d70d5dfe to your computer and use it in GitHub Desktop.
GrapheneDB driver snippet for NeoClient
<?php
require_once('vendor/autoload.php');
use Neoxygen\NeoClient\Client;
// Assuming "default" is your connection alias
$client = new Client();
$client->addConnection('default','https', '{graphenedb_url}', '{graphenedb_port}', true, '{user}', '{password}')
->build();
<?php
require_once('vendor/autoload.php');
use Neoxygen\NeoClient\Client;
$url = parse_url(getenv('GRAPHENEDB_URL'));
// Assuming default is your connection alias
$client = new Client();
$client->addConnection('default', $url['scheme'], $url['host'], $url['port'], true, $url['user'], $url['pass'])
->build();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment