|
| 1 | +CodagPredictionIOBundle |
| 2 | +================== |
| 3 | + |
| 4 | +This bundle provides an [PredictionIO](http://prediction.io/) integration for your Symfony2 Project. |
| 5 | + |
| 6 | +[](https://travis-ci.org/Codag/PredictionIOBundle) |
| 7 | +[](https://packagist.org/packages/codag/predictionio-bundle) |
| 8 | +[](https://packagist.org/packages/codag/predictionio-bundle) |
| 9 | + |
| 10 | +**PredictionIO Methods Supported** |
| 11 | + |
| 12 | +This Bundle is just a wrapper for the [PredictionIO-PHP-SDK](https://github.com/PredictionIO/PredictionIO-PHP-SDK) and will support all methods provided in the SDK. |
| 13 | + |
| 14 | +## Installation |
| 15 | + |
| 16 | +1. Add CodagPredictionIOBundle to your composer.json |
| 17 | +2. Enable the bundle |
| 18 | +3. Configure the bundle |
| 19 | + |
| 20 | +### Step 1: Add CodagAlchemyApiBundle to your composer.json |
| 21 | +```js |
| 22 | +{ |
| 23 | + "require": { |
| 24 | + "codag/predictionio-bundle": "dev-master" |
| 25 | + } |
| 26 | +} |
| 27 | +``` |
| 28 | + |
| 29 | +Update your project dependencies: |
| 30 | +```bash |
| 31 | +php composer.phar update codag/predictionio-bundle |
| 32 | +``` |
| 33 | + |
| 34 | +### Step 2: Enable the bundle |
| 35 | +```php |
| 36 | +<?php |
| 37 | +// app/AppKernel.php |
| 38 | + |
| 39 | +public function registerBundles() |
| 40 | +{ |
| 41 | + $bundles = array( |
| 42 | + // ... |
| 43 | + new Codag\PredictionIOBundle\CodagPredictionIOBundle(), |
| 44 | + ); |
| 45 | +} |
| 46 | +``` |
| 47 | + |
| 48 | +### Step 3: Configure the bundle |
| 49 | + |
| 50 | +Yml configuration: |
| 51 | +```yaml |
| 52 | +# app/config/config.yml |
| 53 | + |
| 54 | +codag_prediction_io: |
| 55 | + app_key: Your App Key |
| 56 | + api_url: Your Api Url # Optional |
| 57 | + |
| 58 | +``` |
| 59 | + |
| 60 | +## Usage |
| 61 | +This bundle provides the service `codag.predictionio` |
| 62 | +```php |
| 63 | +<?php |
| 64 | +$client = $this->get('codag.predictionio')->getClient(); |
| 65 | +``` |
| 66 | + |
| 67 | +For further implementation examples please see also our [Sandbox](https://github.com/Codag/PredictionIOBundle-Sandbox). |
| 68 | + |
| 69 | +##Contribute |
| 70 | + |
| 71 | +If the bundle doesn't allow you to customize an option, I invite you to fork the project, create a feature branch, and send a pull request. |
| 72 | + |
| 73 | +To ensure a consistent code base, you should make sure the code follows |
| 74 | +the [Coding Standards](http://symfony.com/doc/current/contributing/code/standards.html). |
| 75 | + |
| 76 | + |
| 77 | +##License |
| 78 | + |
| 79 | +This bundle is under the MIT license. See the complete license [here](https://github.com/Codag/PredictionIOBundle/blob/master/Resources/meta/LICENSE). |
| 80 | + |
0 commit comments