AbstractOperation.php in Drupal 9
File
composer/Plugin/Scaffold/Operations/AbstractOperation.php
View source
<?php
namespace Drupal\Composer\Plugin\Scaffold\Operations;
use Drupal\Composer\Plugin\Scaffold\ScaffoldFilePath;
abstract class AbstractOperation implements OperationInterface {
protected $contents;
public final function contents() {
if (!isset($this->contents)) {
$this->contents = $this
->generateContents();
}
return $this->contents;
}
protected abstract function generateContents();
public function scaffoldOverExistingTarget(OperationInterface $existing_target) {
return $this;
}
public function scaffoldAtNewLocation(ScaffoldFilePath $destination) {
return $this;
}
}