OperationInterface
interface OperationInterface (View source)
| internal |
Interface for scaffold operation objects.
Methods
Returns the exact data that will be written to the scaffold files.
Process this scaffold operation.
Determines what to do if operation is used at same path as a previous op.
Determines what to do if operation is used without a previous operation.
Details
string
contents()
Returns the exact data that will be written to the scaffold files.
ScaffoldResult
process(ScaffoldFilePath $destination, IOInterface $io, ScaffoldOptions $options)
Process this scaffold operation.
OperationInterface
scaffoldOverExistingTarget(OperationInterface $existing_target)
Determines what to do if operation is used at same path as a previous op.
Default behavior is to scaffold this operation at the specified destination, ignoring whatever was there before.
OperationInterface
scaffoldAtNewLocation(ScaffoldFilePath $destination)
Determines what to do if operation is used without a previous operation.
Default behavior is to scaffold this operation at the specified destination. Most operations overwrite rather than modify existing files, and therefore do not need to do anything special when there is no existing file.