Verzeichnisstruktur phpBB-3.3.16


Veröffentlicht
27.04.2026

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

Example.php

Zuletzt modifiziert: 01.05.2026, 11:28 - Dateigröße: 3.76 KiB


 001  <?php
 002   
 003  namespace OAuth\Helper;
 004   
 005  use Symfony\Component\Finder\Finder;
 006   
 007  /**
 008   * Helper class to be used in sample code.
 009   */
 010  class Example
 011  {
 012      /**
 013       * @var Finder
 014       */
 015      private $finder;
 016   
 017      private $title;
 018   
 019      public function __construct()
 020      {
 021          $this->finder = new Finder();
 022      }
 023   
 024      public function isCli(): bool
 025      {
 026          return PHP_SAPI === 'cli';
 027      }
 028   
 029      public function getFinder(): Finder
 030      {
 031          $this->finder->in(__DIR__ . '/../../../examples/provider/');
 032   
 033          return $this->finder;
 034      }
 035   
 036      public function getHeader(): string
 037      {
 038          $title = $this->title;
 039   
 040          return <<<HTML
 041  <html>
 042  <head>
 043      <title>$title</title>
 044      <meta charset="utf-8">
 045      <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
 046      <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
 047      <link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css"/>
 048      <link rel="stylesheet" href="/bootstrap/css/font-awesome.min.css"/>
 049      <link rel="stylesheet" href="/bootstrap/css/phpspreadsheet.css"/>
 050      <script src="/bootstrap/js/jquery.min.js"></script>
 051      <script src="/bootstrap/js/bootstrap.min.js"></script>
 052  </head>
 053  <body>
 054      <div class="container">
 055          <div class="navbar navbar-default" role="navigation">
 056              <div class="container-fluid">
 057                  <div class="navbar-header">
 058                      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
 059                          <span class="sr-only">Toggle navigation</span>
 060                          <span class="icon-bar"></span>
 061                          <span class="icon-bar"></span>
 062                          <span class="icon-bar"></span>
 063                      </button>
 064                      <a class="navbar-brand" href="/">PHPoAuthLib</a>
 065                  </div>
 066                  <div class="navbar-collapse collapse">
 067                      </ul>
 068                      <ul class="nav navbar-nav navbar-right">
 069                          <li><a href="https://github.com/Lusitanian/PHPoAuthLib"><i class="fa fa-github fa-lg" title="GitHub"></i>&nbsp;</a></li>
 070                      </ul>
 071                  </div>
 072              </div>
 073          </div>
 074          <h1>$title</h1>
 075  HTML;
 076   
 077      }
 078   
 079      public function getFooter()
 080      {
 081          return <<<HTML
 082      </body>
 083      </html>
 084  HTML;
 085   
 086      }
 087   
 088      public function getForm(): string
 089      {
 090          return  <<<HTML
 091              <form>
 092                <div class="form-group">
 093                  <label for="exampleInputEmail1">key</label>
 094                  <input class="form-control" name="key" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="key">
 095                </div>
 096                <div class="form-group">
 097                  <label for="exampleInputPassword1">secret</label>
 098                  <input name="secret" class="form-control" id="exampleInputPassword1" placeholder="secret">
 099                </div>
 100                <button type="submit" class="btn btn-primary">Submit</button>
 101              </form>
 102  HTML;
 103   
 104      }
 105   
 106      public function getContent(): string
 107      {
 108          $response = $this->getHeader();
 109          $response .= $this->getForm();
 110          $response .= $this->getFooter();
 111   
 112          return $response;
 113      }
 114   
 115      public function isShowLink(): bool
 116      {
 117          return true;
 118      }
 119   
 120      public function getCurrentUrl(): string
 121      {
 122          return  'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?oauth=redirect&key=' . urldecode($_GET['key']) . '&secret=' . urldecode($_GET['secret']);
 123      }
 124   
 125      public function getErrorMessage($exception): void
 126      {
 127          echo '<div class="alert alert-danger">' . $exception->getMessage() . '</div>';
 128          echo '<pre>';
 129          print_r($exception);
 130          echo '</pre>';
 131      }
 132   
 133      public function setTitle(string $title): void
 134      {
 135          $this->title = 'PHPoAuthLib - ' . $title;
 136      }
 137  }
 138