2017 © Pedro Peláez
 

symfony-bundle kraken-bundle

Integrates Kraken.io into your Symfony2 application

image

pompdelux/kraken-bundle

Integrates Kraken.io into your Symfony2 application

  • Saturday, May 24, 2014
  • by mrbase
  • Repository
  • 4 Watchers
  • 3 Stars
  • 74 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

KrakenBundle

This bundle allows you to integrate kraken.io into your Symfony2 application., (*1)

Install:

  1. Add KrakenBundle to your dependencies:, (*2)

    // composer.json
    {
        // ...
        "require": {
            // ...
            "pompdelux/kraken-bundle": "1.x"
        }
    }
  2. Use Composer to download and install the bundle:, (*3)

    $ php composer.phar update pompdelux/kraken-bundle
  3. Register the bundle in your application:, (*4)

    // app/AppKernel.php
    class AppKernel extends Kernel
    {
        // ...
        public function registerBundles()
        {
            $bundles = array(
                // ...
                new Pompdelux\KrakenBundle\KrakenBundle()
            );
        }
    }
  4. Add the configuration needed to use the bundle:, (*5)

    // config.yml
    kraken:
        services:
            service_name:
                api_key:    your-kraken.io-key
                api_secret: your-kraken.io-secret

Usage:

Basic example:

$kraken = $this->container->get('pompdelux.kraken.service_name');
$result = $kraken->squeeze('http://example.com/some/public/image.jpg');

Example with callback rather than wait strategy:

# config.yml
kraken:
    services:
        ...
        callback_service:
            api_key:        your-kraken.io-key
            api_secret:     your-kraken.io-secret
            callback:       true
            callback_route: your_callback_route

# routing.yml
acme_kraken_callback:
    pattern: /my/kraken/callback
    defaults: { _controller: AcmeTestBundle:Kraken:callback }
    requirements:
        _method:  POST


$kraken = $this->container->get('pompdelux.kraken.callback_service'); $result = $kraken->squeeze('http://example.com/some/public/image.jpg'); // In AcmeTestBundle/Controller/KrakenController.php // // this method will be called once kraken.io is done processing your image. public function callbackAction(Request $request) { error_log(print_r($request->getContent(), 1)); return new Response(); }

The Versions

24/05 2014

dev-master

9999999-dev https://github.com/pompdelux/kraken-bundle

Integrates Kraken.io into your Symfony2 application

  Sources   Download

MIT

The Requires

 

api client web service kraken image optimization kraken.io

22/05 2014

dev-feature/php-resque-worker

dev-feature/php-resque-worker https://github.com/pompdelux/kraken-bundle

Integrates Kraken.io into your Symfony2 application

  Sources   Download

MIT

The Requires

 

api client web service kraken image optimization kraken.io

19/05 2014

1.0.0

1.0.0.0 https://github.com/pompdelux/kraken-bundle

Integrates Kraken.io into your Symfony2 application

  Sources   Download

MIT

The Requires

 

api client web service kraken image optimization kraken.io