HumHub Documentation (unofficial)

Plugin
in package
implements PluginInterface, EventSubscriberInterface

Plugin is the composer plugin that registers the Yii composer installer.

Tags
author

Qiang Xue qiang.xue@gmail.com

since
2.0

Table of Contents

Interfaces

PluginInterface
EventSubscriberInterface

Properties

$_installer  : Installer
$_packageUpdates  : array<string|int, mixed>
$_vendorDir  : string

Methods

activate()  : mixed
checkPackageUpdates()  : mixed
Listen to POST_PACKAGE_UPDATE event and take note of the package updates.
deactivate()  : mixed
getSubscribedEvents()  : array<string|int, mixed>
showUpgradeNotes()  : mixed
Listen to POST_UPDATE_CMD event to display information about upgrade notes if appropriate.
uninstall()  : mixed
_isUpgrade()  : bool
findUpgradeNotes()  : array<string|int, mixed>|false
Read upgrade notes from a files and returns an array of lines
isNumericVersion()  : bool
Check whether a version is numeric, e.g. 2.0.10.
printUpgradeIntro()  : mixed
Print upgrade intro
printUpgradeLink()  : mixed
Print link to upgrade notes

Properties

$_packageUpdates

private array<string|int, mixed> $_packageUpdates = []

noted package updates.

$_vendorDir

private string $_vendorDir

path to the vendor directory.

Methods

activate()

public activate(Composer $composer, IOInterface $io) : mixed
Parameters
$composer : Composer
$io : IOInterface
Tags
inheritdoc

checkPackageUpdates()

Listen to POST_PACKAGE_UPDATE event and take note of the package updates.

public checkPackageUpdates(PackageEvent $event) : mixed
Parameters
$event : PackageEvent

deactivate()

public deactivate(Composer $composer, IOInterface $io) : mixed
Parameters
$composer : Composer
$io : IOInterface
Tags
inheritdoc

getSubscribedEvents()

public static getSubscribedEvents() : array<string|int, mixed>
Tags
inheritdoc
Return values
array<string|int, mixed>

The event names to listen to.

showUpgradeNotes()

Listen to POST_UPDATE_CMD event to display information about upgrade notes if appropriate.

public showUpgradeNotes(Event $event) : mixed
Parameters
$event : Event

uninstall()

public uninstall(Composer $composer, IOInterface $io) : mixed
Parameters
$composer : Composer
$io : IOInterface
Tags
inheritdoc

_isUpgrade()

private _isUpgrade(PackageEvent $event, UpdateOperation $operation) : bool
Parameters
$event : PackageEvent
$operation : UpdateOperation
Return values
bool

findUpgradeNotes()

Read upgrade notes from a files and returns an array of lines

private findUpgradeNotes(string $packageName, string $fromVersion) : array<string|int, mixed>|false
Parameters
$packageName : string
$fromVersion : string

until which version to read the notes

Return values
array<string|int, mixed>|false

isNumericVersion()

Check whether a version is numeric, e.g. 2.0.10.

private isNumericVersion(string $version) : bool
Parameters
$version : string
Return values
bool

printUpgradeIntro()

Print upgrade intro

private printUpgradeIntro(IOInterface $io, array<string|int, mixed> $package) : mixed
Parameters
$io : IOInterface
$package : array<string|int, mixed>

Print link to upgrade notes

private printUpgradeLink(IOInterface $io, array<string|int, mixed> $package) : mixed
Parameters
$io : IOInterface
$package : array<string|int, mixed>

        
On this page

Search results