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 | arrayornull |
null
|
If null is passed it will be used as getter. Otherwise as factory. |
| $info | array |
[ ]
|
|
| $root | stringornull |
null
|
|
| $version | stringornull |
null
|
|
| $license | Closureorarrayorstringornull |
null
|
Return types
Kirby\Plugin\Pluginornull
Exceptions
| Type | Description |
|---|---|
Kirby\Exception\DuplicateException |