Kirby::plugin()
Kirby plugin factory and getter
Kirby::plugin(string $name, array|null $extends = null, array $info = [ ], string|null $root = null, string|null $version = null, Closure|array|string|null $license = null): Kirby\Plugin\Plugin|null
Parameters
Name | Type | Default | Description |
---|---|---|---|
$namerequired | string |
no default value | |
$extends | array ornull |
null
|
If null is passed it will be used as getter. Otherwise as factory. |
$info | array |
[ ]
|
|
$root | string ornull |
null
|
|
$version | string ornull |
null
|
|
$license | Closure orarray orstring ornull |
null
|
Return types
Kirby\Plugin\Plugin
ornull
Exceptions
Type | Description |
---|---|
Kirby\Exception\DuplicateException |