function Plugin::handler
Instantiates the handler object upon demand.
It is dangerous to update a Composer plugin if it loads any classes prior to the `composer update` operation, and later tries to use them in a post-update hook.
File
-
composer/
Plugin/ Scaffold/ Plugin.php, line 137
Class
- Plugin
- Composer plugin for handling drupal scaffold.
Namespace
Drupal\Composer\Plugin\ScaffoldCode
protected function handler() {
if (!$this->handler) {
$this->handler = new Handler($this->composer, $this->io);
// On instantiation of our handler, notify it if the 'require' command
// was executed.
if ($this->requireWasCalled) {
$this->handler
->requireWasCalled();
}
}
return $this->handler;
}