codag / predictionio-bundle
Symfony2 集成 PredictionIO 的 Bundle
1.1.0
2013-11-23 02:20 UTC
Requires
- php: >=5.3.2
- predictionio/predictionio: dev-master
- symfony/framework-bundle: 2.*
This package is not auto-updated.
Last update: 2024-09-24 04:55:37 UTC
README
此 Bundle 为您的 Symfony2 项目提供 PredictionIO 集成。
支持的 PredictionIO 方法
此 Bundle 仅是 PredictionIO-PHP-SDK 的包装器,并支持 SDK 中提供的所有方法。
安装
- 将 CodagPredictionIOBundle 添加到您的 composer.json
- 启用 Bundle
- 配置 Bundle
步骤 1: 将 CodagAlchemyApiBundle 添加到您的 composer.json
{ "require": { "codag/predictionio-bundle": "dev-master" } }
更新项目依赖
php composer.phar update codag/predictionio-bundle
步骤 2: 启用 Bundle
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Codag\PredictionIOBundle\CodagPredictionIOBundle(), ); }
步骤 3: 配置 Bundle
Yml 配置
# app/config/config.yml codag_prediction_io: app_key: Your App Key api_url: Your Api Url # Optional
用法
此 Bundle 提供服务 codag.predictionio
<?php $client = $this->get('codag.predictionio')->getClient();
有关进一步的实现示例,请参阅我们的 Sandbox。
## 贡献
如果 Bundle 无法让您自定义某个选项,我邀请您将该项目的分支 fork 出来,创建一个功能分支,并提交一个 pull request。
为确保代码库一致,您应该确保代码遵循 编码标准。
## 许可证
此 Bundle 采用 MIT 许可证。完整的许可证请见此处。