Plugins
in package
FinalYes
Permite gestionar los plugins de FacturaScripts: añadir, eliminar, activar, desactivar, etc.
Table of Contents
Constants
- FILE_NAME = 'plugins.json'
Properties
Methods
- 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
booldeploy()
public
static deploy([bool $clean = true ][, bool $initControllers = false ]) : void
Parameters
- $clean : bool = true
- $initControllers : bool = false
disable()
public
static disable(string $pluginName[, bool $runPostDisable = true ]) : bool
Parameters
- $pluginName : string
- $runPostDisable : bool = true
Return values
boolenable()
public
static enable(string $pluginName) : bool
Parameters
- $pluginName : string
Return values
boolenabled()
public
static enabled() : array<string|int, mixed>
Return values
array<string|int, mixed>folder()
public
static folder() : string
Return values
stringget()
public
static get(string $pluginName) : Plugin|null
Parameters
- $pluginName : string
Return values
Plugin|nullinit()
public
static init() : void
isEnabled()
public
static isEnabled(string $pluginName) : bool
Parameters
- $pluginName : string
Return values
boolisInstalled()
public
static isInstalled(string $pluginName) : bool
Parameters
- $pluginName : string
Return values
boollist()
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
remove()
public
static remove(string $pluginName) : bool
Parameters
- $pluginName : string
Return values
boolloadFromFile()
private
static loadFromFile() : void
loadFromFolder()
private
static loadFromFolder() : void
maxOrder()
private
static maxOrder() : int
Return values
intsave()
private
static save() : void
testZipFile()
private
static testZipFile(ZipArchive &$zipFile, string $zipPath, string $zipName) : bool
Parameters
- $zipFile : ZipArchive
- $zipPath : string
- $zipName : string