Creates a new Stub instance for processing template files.
The application instance
The raw contents of the stub template
The absolute path to the stub file
Replaces the rendered stub output with raw content. When called, the provided content will be used as the final output instead of processing the stub template.
The raw content to use instead of rendering the stub
Returns the Stub instance for method chaining
Prepares the stub for file generation by rendering the template and extracting all metadata, without actually writing to disk.
The data to use for stub preparation
Generates the final resource file by processing the stub template and writing the result to disk, with support for force overwrite.
The data to use for stub generation
The Stub class processes template files using the Tempura template engine to generate code files. Stubs are template files that contain placeholders and logic for generating application resources like controllers, models, etc.
Features:
Example