PluginScaffolder
Scaffolds a new plugin directory structure with milpa.json. Generates: plugins/{Name}/ ├── milpa.json ├── {Name}.php ├── Controllers/ ├── Services/ ├── Entities/ ├── Commands/ ├── Interfaces/ ├── Middleware/ ├── Migrations/ ├── Records/ └── Resources/views/
PluginScaffolder::__construct()
public function __construct(string $pluginsPath):Parameters
| Name | Type | Description |
|---|---|---|
| $pluginsPath | string |
PluginScaffolder::scaffold()
public function scaffold(string $name, string $type = 'Mixed', string $author = 'Milpa Team'): arrayScaffold a new plugin.
Parameters
| Name | Type | Description |
|---|---|---|
| $name | string | Plugin name in PascalCase (e.g., "MailPlugin") |
| $type | string | Plugin type: Web, CLI, Mixed, Service |
| $author | string | Author name |
Returns
Path to the created plugin and list of generated files
Throws
\RuntimeException If the plugin directory already exists