Verzeichnisstruktur phpBB-3.3.15


Veröffentlicht
28.08.2024

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

ConsoleExceptionEvent.php

Zuletzt modifiziert: 02.04.2025, 15:03 - Dateigröße: 1.83 KiB


01  <?php
02   
03  /*
04   * This file is part of the Symfony package.
05   *
06   * (c) Fabien Potencier <fabien@symfony.com>
07   *
08   * For the full copyright and license information, please view the LICENSE
09   * file that was distributed with this source code.
10   */
11   
12  namespace Symfony\Component\Console\Event;
13   
14  @trigger_error(sprintf('The "%s" class is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ConsoleErrorEvent instead.', ConsoleExceptionEvent::class), \E_USER_DEPRECATED);
15   
16  use Symfony\Component\Console\Command\Command;
17  use Symfony\Component\Console\Input\InputInterface;
18  use Symfony\Component\Console\Output\OutputInterface;
19   
20  /**
21   * Allows to handle exception thrown in a command.
22   *
23   * @author Fabien Potencier <fabien@symfony.com>
24   *
25   * @deprecated since version 3.3, to be removed in 4.0. Use ConsoleErrorEvent instead.
26   */
27  class ConsoleExceptionEvent extends ConsoleEvent
28  {
29      private $exception;
30      private $exitCode;
31   
32      public function __construct(Command $command, InputInterface $input, OutputInterface $output, \Exception $exception, $exitCode)
33      {
34          parent::__construct($command, $input, $output);
35   
36          $this->setException($exception);
37          $this->exitCode = (int) $exitCode;
38      }
39   
40      /**
41       * Returns the thrown exception.
42       *
43       * @return \Exception The thrown exception
44       */
45      public function getException()
46      {
47          return $this->exception;
48      }
49   
50      /**
51       * Replaces the thrown exception.
52       *
53       * This exception will be thrown if no response is set in the event.
54       *
55       * @param \Exception $exception The thrown exception
56       */
57      public function setException(\Exception $exception)
58      {
59          $this->exception = $exception;
60      }
61   
62      /**
63       * Gets the exit code.
64       *
65       * @return int The command exit code
66       */
67      public function getExitCode()
68      {
69          return $this->exitCode;
70      }
71  }
72