radarrplexorganizrnginxsonarrdashboardheimdallembycouchpotatonzbgetbookmarkapplication-dashboardmuximuxlandingpagestartpagelandinghtpcserverhomepagesabnzbd
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
800 B
37 lines
800 B
<?php
|
|
|
|
namespace UpdateHelper;
|
|
|
|
use Composer\Composer;
|
|
use Composer\EventDispatcher\Event;
|
|
use Composer\EventDispatcher\EventSubscriberInterface;
|
|
use Composer\IO\IOInterface;
|
|
use Composer\Plugin\PluginInterface;
|
|
|
|
class ComposerPlugin implements PluginInterface, EventSubscriberInterface
|
|
{
|
|
protected $io;
|
|
|
|
public function activate(Composer $composer, IOInterface $io)
|
|
{
|
|
$this->io = $io;
|
|
}
|
|
|
|
public static function getSubscribedEvents()
|
|
{
|
|
return array(
|
|
'post-autoload-dump' => array(
|
|
array('onAutoloadDump', 0),
|
|
),
|
|
);
|
|
}
|
|
|
|
public function onAutoloadDump(Event $event)
|
|
{
|
|
if (!class_exists('UpdateHelper\\UpdateHelper')) {
|
|
return;
|
|
}
|
|
|
|
UpdateHelper::check($event);
|
|
}
|
|
}
|
|
|