The ClientBundle provides a wrapper for the PredictionIO
library into the Symfony2 framework.
Using Composer:
Add the following dependencies to your project's composer.json file:
.. code-block::
"require": {
# ..
"predictionio/predictionio-bundle": "*"
# ..
}
and add the following to your project's app/AppKernel.php file:
.. code-block::
# ..
new PredictionIO\ClientBundle\PredictionIOClientBundle(),
# ..
In the project's app/config/config.yml file:
.. code-block::
prediction_io_client:
app_key: SERVER_APP_KEY_HERE
app_url: URL_TO_SERVER_HERE
One can now use $container->get('prediction_io.client') to get an
instantiated client which can be used the same as the PredictionIO-PHP-SDK library.