Wallogit.com
2017 © Pedro Peláez
This is a PHP Data Objects driver for the Neo4j graph database, it allows you to connect to a Neo4j server from PHP using the standard PDO API., (*2)
The project currently only implements a "vanilla" PHP implementation, which means you need to use a special constructor to create your PDO connection. PHP extensions to register the driver with PDO in HHVM and Zend VM are planned future work., (*3)
Neo4jPDO uses Composer, please checkout the composer website for more information., (*4)
To use Neo4j/PDO in your project, simply add it as a composer dependency:, (*5)
"require": {
"neo4j/pdo": "dev-master"
}
// Include dependencies installed with composer
require 'vendor/autoload.php';
$conn = new \Neo4j\Neo4jPDO("http://localhost:7474");
foreach($conn->query('MATCH (n) RETURN count(*) as count') as $row)
{
echo $row['count'];
}
Please refer to the PDO documentation in the PHP manual for detailed documentation of the API., (*6)
PDO->quote: Use parameterized queries instead, (*7)
PDOStatement->getColumnMeta: Not yet implemented, (*8)
Many of the PDO::FETCH_** flags are not yet supported, specifically, currently only PDO::FETCH_BOTH is implemented., (*9)
http://opensource.org/licenses/MIT, (*10)