kwattro / neo4j-ogm-bundle
此包已被弃用且不再维护。未建议替代包。
此包实现了PHP Neo4j OGM
dev-master
2013-05-13 10:49 UTC
Requires
- php: >=5.3.3
- hirevoice/neo4jphp-ogm: dev-master
- symfony/framework-bundle: >=2.0.14,<2.3-dev
This package is not auto-updated.
Last update: 2022-02-01 12:37:06 UTC
README
Neo4j OGM
此包允许您在symfony应用程序中使用Neo4j图形数据库REST API。
它目前是一个工作正在进行中的项目(WIP),因为它依赖于来自 lphuberdeau 的 Neo4j-PHP-OGM,该库提供了与Doctrine Common的集成。
我的主要焦点目前是用户管理,集成FOSUB和Neo4j,我将在以后处理此包。
对于添加编译器到配置以及travis love的贡献将非常感激!
要求
需要
- Hirevoice Neo4J PHP OGM : https://github.com/lphuberdeau/Neo4j-PHP-OGM
安装
安装是一个简单的三步过程
在您的 composer.json 文件中添加包
"require":
....
"kwattro/neo4j-ogm-bundle": "dev-master"
将包添加到您的 AppKernel
new Kwattro\Neo4jBundle\KwattroNeo4jBundle(),
...
在您的 config.yml
文件中配置包
kwattro_neo4j:
host: "localhost"
port: 7474
使用方法
使用方法有点像Doctrine ORM,要访问图形,只需调用图形管理器服务
$graph = $this->container->get('kwattro_neo4j.graph_manager');
// Create a new node
$user = new User();
$user->setUsername('ikwattro');
$user->setFullName('Christophe Willemsen');
$graph->persist($user);
$graph->flush();
// Retrieving node
$repo = $graph->getRepository('Acme\UserBundle\Entity\User');
$user = $repo->findOneByFullname('Christophe Willemsen');
// You can then pass the object to your views layer and use it like a simple Doctrine object
贡献者
Christophe Willemsen : @kwattro
许可
此包受MIT许可约束