ScaffoldFileInfo
class ScaffoldFileInfo (View source)
| internal |
Data object that keeps track of one scaffold file.
Scaffold files are identified primarily by their destination path. Each scaffold file also has an 'operation' object that controls how the scaffold file will be placed (e.g. via copy or symlink, or maybe by appending multiple files together). The operation may have one or more source files.
Properties
| protected ScaffoldFilePath | $destination | The path to the destination. |
|
| protected OperationInterface | $op | The operation used to create the destination. |
Methods
Constructs a ScaffoldFileInfo object.
Gets the Scaffold operation.
Gets the package name.
Gets the destination.
Determines if this scaffold file has been overridden by another package.
Replaces placeholders in a message.
Moves a single scaffold file from source to destination.
Returns TRUE if the target does not exist or has changed.
Details
__construct(ScaffoldFilePath $destination, OperationInterface $op)
Constructs a ScaffoldFileInfo object.
OperationInterface
op()
Gets the Scaffold operation.
string
packageName()
Gets the package name.
ScaffoldFilePath
destination()
Gets the destination.
bool
overridden(string $providing_package)
Determines if this scaffold file has been overridden by another package.
string
interpolate(string $message, array $extra = [], mixed $default = FALSE)
Replaces placeholders in a message.
ScaffoldResult
process(IOInterface $io, ScaffoldOptions $options)
Moves a single scaffold file from source to destination.
final bool
hasChanged()
Returns TRUE if the target does not exist or has changed.