neoxygen / neo4j-console-client

Neo4j Console API的PHP客户端

1.0.0 2014-10-16 20:32 UTC

This package is not auto-updated.

Last update: 2024-09-10 02:49:36 UTC


README

简单的PHP客户端,用于创建Neo4j控制台设置(参见http://console.neo4j.org

用法

安装

通过composer

composer require neoxygen/neo4j-console-client

初始化查询、消息和控制台查询

您可以为控制台添加查询以进行设置,为用户添加消息以及当控制台加载时的第一个查询

require_once 'vendor/autoload.php';

use Neoxygen\ConsoleClient\Client;

$consoleClient = new Client();
$consoleClient
    ->addInitQuery('CREATE (p:Person)')
    ->addInitQuery('CREATE (c:Company)')
    ->addInitQuery('MERGE (p)-[:WORKS_AT]->(c);')
    ->addConsoleMessage('An awesome Neo4j console setup')
    ->createConsole();

$consoleUrl = $consoleClient->getShortLink();
// -> http://console.neo4j.org/r/8iijau

打开链接并享受!

img

待办事项

[ ] 在终端中从文件生成

作者

Christophe Willemsen : twitter | github

许可

在MIT许可下发布,查看与此库一起提供的许可文件