Last active
August 29, 2015 14:06
-
-
Save ikwattro/5c201592a055d70d5dfe to your computer and use it in GitHub Desktop.
GrapheneDB driver snippet for NeoClient
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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