PHP code example of pompdelux / kraken-bundle

1. Go to this page and download the library: Download pompdelux/kraken-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

pompdelux / kraken-bundle example snippets


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


$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();
}