if (!
$this->managed
) { $message = ' - <info>NOTICE</info> Modifying existing file at <info>[dest-rel-path]</info>.';
if (!
file_exists($destination_path)) { $message = ' - <info>NOTICE</info> Creating a new file at <info>[dest-rel-path]</info>.';
} $message .= ' Examine the contents and ensure that it came out correctly.';
$io->
write($interpolator->
interpolate($message));
} // Notify that we are prepending, if there is prepend data.
if (!
empty($this->prepend
)) { $this->prepend->
addInterpolationData($interpolator, 'prepend'
);
$io->
write($interpolator->
interpolate(" - Prepend to <info>[dest-rel-path]</info> from <info>[prepend-rel-path]</info>"
));
} // Notify that we are appending, if there is append data.
if (!
empty($this->append
)) { $this->append->
addInterpolationData($interpolator, 'append'
);
$io->
write($interpolator->
interpolate(" - Append to <info>[dest-rel-path]</info> from <info>[append-rel-path]</info>"
));
} // Write the resulting data
file_put_contents($destination_path,
$this->
contents());