emanueleminotto / embedly-module
Embed.ly module for Zend Framework 2
1.1.0
2015-03-07 12:59 UTC
Requires
- emanueleminotto/embedly: ~1.1
- guzzlehttp/guzzle: ~5.2
- zendframework/zendframework: ~2.3
Requires (Dev)
- phpunit/phpunit: ~4.5
This package is auto-updated.
Last update: 2024-11-28 07:09:26 UTC
README
An embed.ly module for Zend Framework 2 based on the Embedly library.
API: emanueleminotto.github.io/EmbedlyModule
Installation
Open a command console, enter your project directory and execute the following command to download the latest stable version of this module:
$ composer require emanueleminotto/embedly-module
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Usage
// EmanueleMinotto\Embedly\Client instance $embedly = $this->getServiceLocator()->get('embedly');
Configuration
The module doesn't need a configuration to be used, but you can add an API key and a reference to a Guzzle 5 client.
return array( 'embedly' => array( 'api_key' => 'xxxxxxxx', 'http_client' => 'guzzle_client_service_reference', ), );
View Helper
A view helper is provided in this module, the method embedlyDisplay
works like the library display
method (ref).
<img src="<?php echo $this->embedlyDisplay('resize', [ 'url' => 'http://placehold.it/500', 'width' => 100, 'height' => 100, ]); ?>" />