2017 © Pedro PelĆ”ez
 

symfony-bundle packagist-bundle

This bundle of symfony2 to integration packagist API

image

baconmanager/packagist-bundle

This bundle of symfony2 to integration packagist API

  • Tuesday, April 26, 2016
  • by adanfm
  • Repository
  • 3 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

BaconPackagistBundle

Codacy Badge SensioLabsInsight, (*1)

Este bundle Ć© responsĆ”vel por criar um serviƧo no Symfony para a integraĆ§Ć£o com a API do Packagist, (*2)

InstalaĆ§Ć£o

Para instalar o bundle basta rodar o seguinte comando abaixo:, (*3)

$ composer require baconmanager/packagist-bundle

Agora adicione os seguintes bundles no arquivo AppKernel.php:, (*4)

<?php
// app/AppKernel.php
public function registerBundles()
{
    // ...
    new Bacon\Bundle\PackagistBundle\BaconPackagistBundle(),
    // ...
}

No arquivo app/config/config.yml adicione as seguintes configuraƧƵes:, (*5)

bacon_packagist:
    api:
        base_url: https://packagist.org

Utilizando o bundle:, (*6)

<?php
// src/AppBundle/Controller/DefaultController.php

public function indexAction()
{
    $api  = $this->get('bacon_packagist.api');

    // Pesquisa nomes de bibliotecas com a referencia
    $return = $api
        ->api('search.json','GET')
        ->setParameters([
            'q' => 'symfony2'
        ])
        ->getResponse()
    ;
    var_dump($return);


    // Pesquisa detalhes de uma determinada biblioteca
    /*
    $return = $api
        ->api('packages/swiftmailer/swiftmailer.json','GET')
        ->getResponse()
    ;
    var_dump($return);
    */
}

The Versions

26/04 2016

dev-master

9999999-dev

This bundle of symfony2 to integration packagist API

  Sources   Download

MIT

The Requires

 

by Adan Felipe Medeiros

generator bundle