class LoggingBeginner
Same name in this branch
- 11.x core/modules/package_manager/src/LoggingBeginner.php \Drupal\package_manager\LoggingBeginner
A composer-stager Beginner decorator that adds logging.
@internal
Hierarchy
- class \Drupal\package_manager_bypass\LoggingBeginner implements \PhpTuf\ComposerStager\API\Core\BeginnerInterface uses \Drupal\package_manager_bypass\ComposerStagerExceptionTrait, \Drupal\package_manager_bypass\LoggingDecoratorTrait
Expanded class hierarchy of LoggingBeginner
1 file declares its use of LoggingBeginner
- StageBaseTest.php in core/
modules/ package_manager/ tests/ src/ Kernel/ StageBaseTest.php
File
-
core/
modules/ package_manager/ tests/ modules/ package_manager_bypass/ src/ LoggingBeginner.php, line 19
Namespace
Drupal\package_manager_bypassView source
final class LoggingBeginner implements BeginnerInterface {
use ComposerStagerExceptionTrait;
use LoggingDecoratorTrait;
/**
* The decorated service.
*
* @var \PhpTuf\ComposerStager\API\Core\BeginnerInterface
*/
private $inner;
/**
* Constructs a Beginner object.
*
* @param \Drupal\Core\State\StateInterface $state
* The state service.
* @param \PhpTuf\ComposerStager\API\Core\BeginnerInterface $inner
* The decorated beginner service.
*/
public function __construct(StateInterface $state, BeginnerInterface $inner) {
$this->state = $state;
$this->inner = $inner;
}
/**
* {@inheritdoc}
*/
public function begin(PathInterface $activeDir, PathInterface $stagingDir, ?PathListInterface $exclusions = NULL, ?OutputCallbackInterface $callback = NULL, ?int $timeout = ProcessInterface::DEFAULT_TIMEOUT) : void {
$this->saveInvocationArguments($activeDir, $stagingDir, $exclusions?->getAll(), $timeout);
$this->throwExceptionIfSet();
$this->inner
->begin($activeDir, $stagingDir, $exclusions, $callback, $timeout);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
ComposerStagerExceptionTrait::setException | public static | function | Sets an exception to be thrown. |
ComposerStagerExceptionTrait::throwExceptionIfSet | private | function | Throws the exception if set. |
LoggingBeginner::$inner | private | property | The decorated service. |
LoggingBeginner::begin | public | function | |
LoggingBeginner::__construct | public | function | Constructs a Beginner object. |
LoggingDecoratorTrait::$state | private | property | The state service. |
LoggingDecoratorTrait::getInvocationArguments | public | function | Returns the arguments from every invocation of the main class method. |
LoggingDecoratorTrait::saveInvocationArguments | private | function | Records the arguments from an invocation of the main class method. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.