PHP Class Knp\Bundle\KnpBundlesBundle\Consumer\UpdateBundleConsumer

Author: Romain Pouclet ([email protected])
Inheritance: implements OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface
Show file Open project: KnpLabs/KnpBundles

Public Methods

Method Description
__construct ( Doctrine\Common\Persistence\ObjectManager $em, OwnerManager $ownerManager, Repo $githubRepoApi, Travis $travis, SolrIndexer $indexer )
execute ( PhpAmqpLib\Message\AMQPMessage $msg ) Callback called from RabbitMQ to update a bundle
setLogger ( Symfony\Component\HttpKernel\Log\LoggerInterface $logger ) Set a logger instance

Protected Methods

Method Description
removeBundle ( Bundle $bundle ) Removes a specified bundle

Private Methods

Method Description
updateContributors ( Bundle $bundle ) Takes a bundle and update its contributors
updateKeywords ( Bundle $bundle, object $repository ) Updates bundle keywords fetched from composer.json
updateScore ( Bundle $bundle, object $repository ) Updates bundle score

Method Details

__construct() public method

public __construct ( Doctrine\Common\Persistence\ObjectManager $em, OwnerManager $ownerManager, Repo $githubRepoApi, Travis $travis, SolrIndexer $indexer )
$em Doctrine\Common\Persistence\ObjectManager
$ownerManager Knp\Bundle\KnpBundlesBundle\Manager\OwnerManager
$githubRepoApi Knp\Bundle\KnpBundlesBundle\Github\Repo
$travis Knp\Bundle\KnpBundlesBundle\Travis\Travis
$indexer Knp\Bundle\KnpBundlesBundle\Indexer\SolrIndexer

execute() public method

Callback called from RabbitMQ to update a bundle
public execute ( PhpAmqpLib\Message\AMQPMessage $msg )
$msg PhpAmqpLib\Message\AMQPMessage serialized Message

removeBundle() protected method

Removes a specified bundle
protected removeBundle ( Bundle $bundle )
$bundle Knp\Bundle\KnpBundlesBundle\Entity\Bundle

setLogger() public method

Set a logger instance
public setLogger ( Symfony\Component\HttpKernel\Log\LoggerInterface $logger )
$logger Symfony\Component\HttpKernel\Log\LoggerInterface