Plugins
in package
Permite gestionar los plugins de FacturaScripts: añadir, eliminar, activar, desactivar, etc.
Table of Contents
- FILE_NAME = 'plugins.json'
- $plugins : array<string|int, Plugin>
- add() : bool
- deploy() : void
- disable() : bool
- enable() : bool
- enabled() : array<string|int, mixed>
- folder() : string
- get() : Plugin|null
- init() : void
- isEnabled() : bool
- isInstalled() : bool
- list() : array<string|int, Plugin>
- load() : void
- remove() : bool
- loadFromFile() : void
- loadFromFolder() : void
- maxOrder() : int
- save() : void
- testZipFile() : bool
Constants
FILE_NAME
public
mixed
FILE_NAME
= 'plugins.json'
Properties
$plugins
private
static array<string|int, Plugin>
$plugins
Methods
add()
public
static add(string $zipPath[, string $zipName = 'plugin.zip' ][, bool $force = false ]) : bool
Parameters
- $zipPath : string
- $zipName : string = 'plugin.zip'
- $force : bool = false
Return values
bool —deploy()
public
static deploy([bool $clean = true ][, bool $initControllers = false ]) : void
Parameters
- $clean : bool = true
- $initControllers : bool = false
Return values
void —disable()
public
static disable(string $pluginName) : bool
Parameters
- $pluginName : string
Return values
bool —enable()
public
static enable(string $pluginName) : bool
Parameters
- $pluginName : string
Return values
bool —enabled()
public
static enabled() : array<string|int, mixed>
Return values
array<string|int, mixed> —folder()
public
static folder() : string
Return values
string —get()
public
static get(string $pluginName) : Plugin|null
Parameters
- $pluginName : string
Return values
Plugin|null —init()
public
static init() : void
Return values
void —isEnabled()
public
static isEnabled(string $pluginName) : bool
Parameters
- $pluginName : string
Return values
bool —isInstalled()
public
static isInstalled(string $pluginName) : bool
Parameters
- $pluginName : string
Return values
bool —list()
public
static list([bool $hidden = false ][, string $orderBy = 'name' ]) : array<string|int, Plugin>
Parameters
- $hidden : bool = false
- $orderBy : string = 'name'
Return values
array<string|int, Plugin> —load()
public
static load() : void
Return values
void —remove()
public
static remove(string $pluginName) : bool
Parameters
- $pluginName : string
Return values
bool —loadFromFile()
private
static loadFromFile() : void
Return values
void —loadFromFolder()
private
static loadFromFolder() : void
Return values
void —maxOrder()
private
static maxOrder() : int
Return values
int —save()
private
static save() : void
Return values
void —testZipFile()
private
static testZipFile(ZipArchive &$zipFile, string $zipPath, string $zipName) : bool
Parameters
- $zipFile : ZipArchive
- $zipPath : string
- $zipName : string