Embedly Module
, (*1)
An embed.ly module for Zend Framework 2 based on the Embedly library., (*2)
API: emanueleminotto.github.io/EmbedlyModule, (*3)
Installation
Open a command console, enter your project directory and execute the
following command to download the latest stable version of this module:, (*4)
$ composer require emanueleminotto/embedly-module
This command requires you to have Composer installed globally, as explained
in the installation chapter
of the Composer documentation., (*5)
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., (*6)
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)., (*7)
html+php
<img src="<?php echo $this->embedlyDisplay('resize', [
'url' => 'http://placehold.it/500',
'width' => 100,
'height' => 100,
]); ?>" />
, (*8)