vaffel/silex-imbo

Imbo service provider for Silex

1.3 2015-12-04 11:14 UTC

This package is auto-updated.

Last update: 2024-11-15 04:05:57 UTC


README

Service provider making the Imbo accessible to your Silex application.

Build Status

Installation

Add "vaffel/silex-imbo": "XXX" to the composer.json file inside your project and do a composer install. Check Composer for the latest available version.

Setup instructions

Register the Imbo service provider in your Silex app like this;

$app->register(new ImboServiceProvider(), array(
    'imbo.serverUrls' => ['http://example.net', ...], // Array of urls to imbo installations
    'imbo.publicKey'  => $publicKey,                  // Public key
    'imbo.privateKey' => $privateKey,                 // Private key
    'imbo.user'       => $user,                       // User
));

Usage

After registering the Imbo service provider, the ImboClient instance can be accessed from the $app variable like this;

$response = $app['imbo']->addImage('/path/to/image.jpg');

Tests

The service provider comes with PHPUnit tests and can be run by doing a ./vendor/phpunit/phpunit/phpunit inside the silex-imbo folder.

Documentation

Read the full ImboClient documentation at imboclient-php.readthedocs.org.

License

License Copyright (c) 2014, Kristoffer Brabrand kristoffer@brabrand.no

Licensed under the MIT License