class Generator (View source)

Traits

Methods

throwFailsCommand(string $message, string $command = null)

Throw fails command

__construct(string $base_dir, string $name)

GeneratorCommand constructor

filenameIsValide($filename)

Check if filename is valide

bool
fileExists()

Check if controller exists

string
getPath()

Get file path

bool
exists()

Check if controller exists

bool
write(string $type, array $data = [])

Write file

bool|mixed|string
makeStub(string $type, array $data = [])

Stub render

setName(string $name)

Set writing filename

setBaseDirectory(string $base_dir)

Get the base directory

Details

protected throwFailsCommand(string $message, string $command = null)

Throw fails command

Parameters

string $message
string $command

Exceptions

ErrorException

__construct(string $base_dir, string $name)

GeneratorCommand constructor

Parameters

string $base_dir
string $name

filenameIsValide($filename)

Check if filename is valide

Parameters

$filename

bool fileExists()

Check if controller exists

Return Value

bool

string getPath()

Get file path

Return Value

string

bool exists()

Check if controller exists

Return Value

bool

bool write(string $type, array $data = [])

Write file

Parameters

string $type
array $data

Return Value

bool

bool|mixed|string makeStub(string $type, array $data = [])

Stub render

Parameters

string $type
array $data

Return Value

bool|mixed|string

setName(string $name)

Set writing filename

Parameters

string $name

setBaseDirectory(string $base_dir)

Get the base directory

Parameters

string $base_dir