CreateModule
Less than 1 minute
CreateModule
Class CreateModule.
class CreateModule extends \Hazaar\Console\ModuleExtends: Hazaar\Console\Module
Console module for creating new application objects such as views, controllers, layouts, and models. Provides a command-line interface to generate files from templates.
Methods
configure
Configures the module by adding the 'create' command and its arguments.
protected configure(): voidReturns: void
execute
Executes the 'create' command to generate a new application object.
protected execute(Input $input, Output $output): intReturns: int
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | Hazaar\Console\Input | the input interface for command arguments |
$output | Hazaar\Console\Output | the output interface for writing messages |
create
Creates a new application object file from a template.
private create(string $type, string $name, string $targetDir = '.'): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$type | string | the type of object to create (layout, view, controller, controller_basic, controller_action, model) |
$name | string | the name of the object to create |
$targetDir | string | The target directory for the new file. Defaults to current directory. |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:18 +0000