Ejemplo n.º 1
0
 /**
  * @param PackageEvent $event
  */
 public function onDisablePackage(PackageEvent $event)
 {
     $package = $event->getPackage();
     if ($package->getRemote()->getAdapter() !== 'GitLab') {
         return;
     }
     $this->adapter->disableHook($package);
 }
Ejemplo n.º 2
0
 /**
  * @param PackageEvent $event
  */
 public function onCreatePackage(PackageEvent $event)
 {
     $package = $event->getPackage();
     $config = $this->entityManager->getRepository('Terramar\\Packages\\Plugin\\Satis\\PackageConfiguration')->findOneBy(array('package' => $package));
     if (!$config) {
         $config = new PackageConfiguration();
         $config->setPackage($package);
     }
     $this->entityManager->persist($config);
 }
Ejemplo n.º 3
0
 /**
  * Constructor.
  *
  * @param Package $package        The updated package
  * @param string  $repositoryPath The path to the cloned repository
  */
 public function __construct(Package $package, $repositoryPath)
 {
     $this->repositoryPath = $repositoryPath;
     parent::__construct($package);
 }
Ejemplo n.º 4
0
 /**
  * Constructor.
  * 
  * @param Package $package The updated package
  * @param mixed   $payload Any data received from the remote host
  */
 public function __construct(Package $package, $payload)
 {
     $this->payload = $payload;
     parent::__construct($package);
 }
Ejemplo n.º 5
0
 public function testGetPackage()
 {
     $this->assertSame($this->package, $this->sut->getPackage());
 }