View Helper for Zend Framework 2 using the Packagist API
Client and View-Helper-Collection for Zend Framework 2 using the Packagist API
<?php
// fetch a list of all vendor-names/package-names (inside a view script)
echo $this->packagist()->fetch();
// will output something like
0x20h/monoconf
11ya/excelbundle
11ya/phpexcel
2085020/api_pingdom
2085020/zendframework1
...
// optional use of an other separator than <br />
echo $this->packagist()->search('|');
<?php
// for a query based search (inside a view script)
echo $this->packagist()->search(array('q' => 'ViewHelper_Packagist'));
// will output something like
<ul id="packagistList">
<ul class="packagistRow">
<li class="packagistName">
<a href="https://packagist.org/packages/siad007/ViewHelper_Packagist">siad007/ViewHelper_Packagist</a>
</li>
<li class="packagistDescription">View Helper for Zend Framework 2 using the Packagist API</li>
<li class="packagistDownloads">123</li>
<li class="packagistFavors">0</li>
</ul>
...
</ul>
// for a tag based search
echo $this->packagist()->search(array('tags' => 'zf1'));
// for multiple tags
echo $this->packagist()->search(array('tags' => array('zf1', 'view helper')));
// for a tag and query based search
echo $this->packagist()->search(array('q' => 'view helper', 'tags' => 'zf1'));
// or the most 15 popular packages
echo $this->packagist()->search(array('page' => '1', 'q' => ''));
BSD 3-Clause