PHP Class Knp\Bundle\KnpBundlesBundle\Updater\Updater

Show file Open project: KnpLabs/KnpBundles Class Usage Examples

Public Methods

Method Description
__construct ( EntityManager $em, BundleManager $bundleManager, Knp\Bundle\KnpBundlesBundle\Finder\FinderInterface $finder, Repo $githubRepoApi )
addBundle ( string $fullName, boolean $updateRepo = true ) : boolean | Bundle Add or update a repo
cleanupBundlesActivities ( $limit = 30 )
createMissingBundles ( array $foundBundles )
removeDuplicatedActivities ( ) This method is a fix in case of other commands don't work as expected.
removeNonSymfonyBundles ( )
removeRepo ( Bundle $bundle ) : boolean
searchNewBundles ( )
setBundleUpdateProducer ( Knp\Bundle\KnpBundlesBundle\Producer\ProducerInterface $bundleUpdateProducer )
setOutput ( Symfony\Component\Console\Output\OutputInterface $output )
updateBundleData ( $owner, $name )
updateBundlesData ( )
updateRepo ( Bundle $bundle )

Private Methods

Method Description
notifyInvalid ( string | false $bundle, null | string $reason = null )
paginateExistingBundles ( integer $page, integer $limit = 100 ) : Pagerfanta\Pagerfanta

Method Details

__construct() public method

public __construct ( EntityManager $em, BundleManager $bundleManager, Knp\Bundle\KnpBundlesBundle\Finder\FinderInterface $finder, Repo $githubRepoApi )
$em Doctrine\ORM\EntityManager
$bundleManager Knp\Bundle\KnpBundlesBundle\Manager\BundleManager
$finder Knp\Bundle\KnpBundlesBundle\Finder\FinderInterface
$githubRepoApi Knp\Bundle\KnpBundlesBundle\Github\Repo

addBundle() public method

Add or update a repo
public addBundle ( string $fullName, boolean $updateRepo = true ) : boolean | Bundle
$fullName string A full repo name like KnpLabs/KnpMenuBundle
$updateRepo boolean Whether or not to fetch information
return boolean | Knp\Bundle\KnpBundlesBundle\Entity\Bundle

cleanupBundlesActivities() public method

public cleanupBundlesActivities ( $limit = 30 )

createMissingBundles() public method

public createMissingBundles ( array $foundBundles )
$foundBundles array

removeDuplicatedActivities() public method

This method is a fix in case of other commands don't work as expected.

removeNonSymfonyBundles() public method

removeRepo() public method

public removeRepo ( Bundle $bundle ) : boolean
$bundle Knp\Bundle\KnpBundlesBundle\Entity\Bundle
return boolean

searchNewBundles() public method

public searchNewBundles ( )

setBundleUpdateProducer() public method

public setBundleUpdateProducer ( Knp\Bundle\KnpBundlesBundle\Producer\ProducerInterface $bundleUpdateProducer )
$bundleUpdateProducer Knp\Bundle\KnpBundlesBundle\Producer\ProducerInterface

setOutput() public method

public setOutput ( Symfony\Component\Console\Output\OutputInterface $output )
$output Symfony\Component\Console\Output\OutputInterface

updateBundleData() public method

public updateBundleData ( $owner, $name )

updateBundlesData() public method

public updateBundlesData ( )

updateRepo() public method

public updateRepo ( Bundle $bundle )
$bundle Knp\Bundle\KnpBundlesBundle\Entity\Bundle