PHP Class Piwik\Plugins\CorePluginsAdmin\PluginInstaller

Show file Open project: piwik/piwik Class Usage Examples

Public Methods

Method Description
__construct ( Client | null $client = null ) PluginInstaller constructor.
installOrUpdatePluginFromFile ( $pathToZip )
installOrUpdatePluginFromMarketplace ( $pluginName )

Private Methods

Method Description
checkMarketplaceIsEnabled ( )
copyPluginToDestination ( $tmpPluginFolder )
downloadPluginFromMarketplace ( ) : false | string
extractPluginFiles ( $pluginZipFile, $pathExtracted )
fixPluginFolderIfNeeded ( $tmpPluginFolder )
getNameOfFirstSubfolder ( $pluginDir ) : string
getPathToPluginJson ( $tmpPluginFolder )
getPluginMetadataIfValid ( $tmpPluginFolder )
makeSureFoldersAreWritable ( )
makeSurePluginJsonExists ( $tmpPluginFolder )
makeSurePluginNameIsValid ( )
makeSureThereAreNoMissingRequirements ( $metadata )
removeFileIfExists ( $targetTmpFile )
removeFolderIfExists ( $pathExtracted )

Method Details

__construct() public method

PluginInstaller constructor.
public __construct ( Client | null $client = null )
$client Piwik\Plugins\Marketplace\Api\Client | null

installOrUpdatePluginFromFile() public method

public installOrUpdatePluginFromFile ( $pathToZip )

installOrUpdatePluginFromMarketplace() public method

public installOrUpdatePluginFromMarketplace ( $pluginName )