BakeQueueTaskCommand
extends SimpleBakeCommand
in package
Command class for generating queue task files and their tests.
Table of Contents
Properties
- $pathFragment : string
- Task name used in path generation.
- $_name : string
Methods
- bake() : void
- bakeTest() : void
- Generate a test case.
- buildOptionParser() : ConsoleOptionParser
- Gets the option parser instance and configures it.
- defaultName() : string
- fileName() : string
- name() : string
- template() : string
- templateData() : array<string|int, mixed>
- generateTaskTestContent() : string
Properties
$pathFragment
Task name used in path generation.
public
string
$pathFragment
= 'Queue/Task/'
$_name
protected
string
$_name
Methods
bake()
public
bake(string $name, Arguments $args, ConsoleIo $io) : void
Parameters
- $name : string
- $args : Arguments
- $io : ConsoleIo
Tags
bakeTest()
Generate a test case.
public
bakeTest(string $name, Arguments $args, ConsoleIo $io) : void
Parameters
- $name : string
-
The class to bake a test for.
- $args : Arguments
-
The console arguments
- $io : ConsoleIo
-
The console io
buildOptionParser()
Gets the option parser instance and configures it.
public
buildOptionParser(ConsoleOptionParser $parser) : ConsoleOptionParser
Parameters
- $parser : ConsoleOptionParser
-
Parser instance
Return values
ConsoleOptionParserdefaultName()
public
static defaultName() : string
Tags
Return values
stringfileName()
public
fileName(string $name) : string
Parameters
- $name : string
Tags
Return values
stringname()
public
name() : string
Tags
Return values
stringtemplate()
public
template() : string
Tags
Return values
stringtemplateData()
public
templateData(Arguments $arguments) : array<string|int, mixed>
Parameters
- $arguments : Arguments
Tags
Return values
array<string|int, mixed>generateTaskTestContent()
protected
generateTaskTestContent(string $name, string $namespace) : string
Parameters
- $name : string
- $namespace : string