PHP code example of juststeveking / neo4j-http-adapter
1. Go to this page and download the library: Download juststeveking/neo4j-http-adapter library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
juststeveking / neo4j-http-adapter example snippets
use JustSteveKing\Graph\Connection\Adapters\Neo4j\Adapters\Http\HttpAdapter;
$adapter = HttpAdapter::build(
'http://neo4j:password@localhost:7474',
'my_database'
);
use JustSteveKing\Graph\Connection\Adapters\Neo4j\Adapters\Http\HttpAdapter;
$adapter = HttpAdapter::build(
'http://neo4j:password@localhost:7474',
'my_database'
);
$database = $adapter->on('database-name');
// Add a query to the transaction pipeline.
$database->query('MATCH (person:Person) WHERE person.name = "Tom Hanks" RETURN person');
// Add another query to the transaction pipeline
$database->query('MATCH (film:Film) WHERE film.name = "Forrest Gump" RETURN film');
use JustSteveKing\Graph\Connection\Adapters\Neo4j\Adapters\Http\HttpAdapter;
$adapter = HttpAdapter::build(
'http://neo4j:password@localhost:7474',
'my_database'
);
$database = $adapter->on('database-name');
// Add a query to the transaction pipeline.
$database->query('MATCH (person:Person) WHERE person.name = "Tom Hanks" RETURN person');
$response = $database->send();