Debian Codegraph @

vendor/wikimedia/shellbox/src/Command/ServerUnboxedExecutor.php

raw
1 <?php
2
3 namespace Shellbox\Command;
4
5 use Shellbox\TempDirManager;
6
7 /**
8 * Typically UnboxedExecutor rarely needs a TempDirManager, and so it is
9 * lazy-initialised to avoid the need for secure random numbers in the usual
10 * case. This ServerUnboxedExecutor instead takes a TempDirManager injected
11 * into its constructor, which is convenient for the Server since it has already
12 * initialised such an object.
13 */
14 class ServerUnboxedExecutor extends UnboxedExecutor {
15 /** @var TempDirManager */
16 private $tempDirManager;
17
18 /**
19 * @param TempDirManager $tempDirManager
20 */
21 public function __construct( TempDirManager $tempDirManager ) {
22 parent::__construct();
23 $this->tempDirManager = $tempDirManager;
24 }
25
26 protected function getTempDirManager() {
27 return $this->tempDirManager;
28 }
29 }