\MockDataTask
Defines the task that creates, populates, or cleans up mock data.
ex:
/dev/tasks/MockDataTask?args[]=generate&args[]=MyDataObject&count=10
/dev/tasks/MockDataTask?args[]=cleanup&args[]=MyDataObject
For command line usage, use the "mockdata" executable contained in the root
of the module directory.
mockdata generate MyDataObject -count 10
mockdata populate MyDataObject --no-downloads
mockdata cleanup
- Author: Uncle Cheese <unclecheese@leftandmain.com>
Synopsis
class MockDataTask
extends BuildTask
{
- // members
- protected string $title = "Generate or populate records with mock data";
- protected SS_HTTPRequest $request;
- // methods
- public void run()
- protected void runBuilderCommand()
- protected void cleanup()
- protected void showError()
- protected void writeOut()
Hierarchy
Extends
- BuildTask
Members
protected
- $request — SS_HTTPRequest
- $title — string
Methods
protected
- cleanup() — Deletes mock data records using references in {@link MockDataLog}
- runBuilderCommand() — Runs a command on the {@link MockDataBuilder} object using options defined in the request.
- showError() — Present an error to the client
- writeOut() — Present a message to the client
public
- run() — Runs the task