klaussilveira/neo4j-ogm-bundle
Composer 安装命令:
composer require klaussilveira/neo4j-ogm-bundle
包简介
This bundle provides a simple integration of the Neo4j PHP Object Graph Mapper into Symfony2
README 文档
README
This bundle provides a simple integration of the "Neo4j PHP Object Graph Mapper" from Louis-Philippe Huberdeau into Symfony2. The Neo4j OGM is an object management layer built on top of Josh Adell's Neo4jPHP. It allows manipulation of data inside the Neo4j graph database through the REST connectors.
Installation
To install this bundle, add this to your project's composer.json:
"require": { // ... "klaussilveira/neo4j-ogm-bundle": "dev-master", }
Next, update your vendors by running:
$ composer update
Now enable the bundle in the kernel:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Neo4j\OGM\OGMBundle\Neo4jOGMBundle(), ); }
And configure the bundle by adding the neo4j_ogm namespace into config.yml:
neo4j_ogm: host: 'localhost' port: 7474
Congratulations! You're ready to use Neo4j OGM into Symfony2.
Basic Usage
The only thing to do is to request the neo4j.manager service from the
container to get an instance of HireVoice\Neo4j\EntityManager.
<?php $em = $this->container->get('neo4j.manager'); $repo = $em->getRepository('Entity\\User'); $john = $repo->findOneByFullName('John Doe'); $list = $em->createCypherQuery() ->startWithNode('john', $john) ->match('john -[:follow]-> followedBy <-[:follow]- similarInterest') ->match('similarInterest -[:follow]-> potentialMatch') ->end('potentialMatch', 'count(*)') ->order('count(*) DESC') ->limit(10) ->getList();
Configuration
You can easily configure the Neo4j OGM by changing neo4j_ogm on your config.yml:
neo4j_ogm: transport: 'curl' host: 'localhost' port: 7474 username: 'test' password: '123456' proxy_dir: '/tmp' debug: true
klaussilveira/neo4j-ogm-bundle 适用场景与选型建议
klaussilveira/neo4j-ogm-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 24.83k 次下载、GitHub Stars 达 29, 最近一次更新时间为 2012 年 11 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「database」 「graph」 「neo4j」 「ogm」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 klaussilveira/neo4j-ogm-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 klaussilveira/neo4j-ogm-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 klaussilveira/neo4j-ogm-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Dibi is Database Abstraction Library for PHP
Symfony integration for Neo4j
Netgen Open Graph Bundle is an Ibexa Platform bundle that allows simple integration with Open Graph protocol.
Store your language lines in the database, yaml or other sources
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
A tool for scraping URL resources (oEmbed, OpenGraph, Twitter cards, JSON-LD)
统计信息
- 总下载量: 24.83k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 30
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-11-20