Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

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

FirstAvailable.php

Zuletzt modifiziert: 09.10.2024, 12:59 - Dateigröße: 1.76 KiB


 01  <?php
 02   
 03  /*
 04  * @package   s9e\TextFormatter
 05  * @copyright Copyright (c) 2010-2016 The s9e Authors
 06  * @license   http://www.opensource.org/licenses/mit-license.php The MIT License
 07  */
 08  namespace s9e\TextFormatter\Configurator\JavaScript\Minifiers;
 09  use ArrayAccess;
 10  use Exception;
 11  use RuntimeException;
 12  use s9e\TextFormatter\Configurator\Collections\MinifierList;
 13  use s9e\TextFormatter\Configurator\JavaScript\Minifier;
 14  use s9e\TextFormatter\Configurator\Traits\CollectionProxy;
 15   
 16  class FirstAvailable extends Minifier implements ArrayAccess
 17  {
 18      public function __call($methodName, $args)
 19      {
 20          return \call_user_func_array(array($this->collection, $methodName), $args);
 21      }
 22      public function offsetExists($offset)
 23      {
 24          return isset($this->collection[$offset]);
 25      }
 26      public function offsetGet($offset)
 27      {
 28          return $this->collection[$offset];
 29      }
 30      public function offsetSet($offset, $value)
 31      {
 32          $this->collection[$offset] = $value;
 33      }
 34      public function offsetUnset($offset)
 35      {
 36          unset($this->collection[$offset]);
 37      }
 38      public function count()
 39      {
 40          return \count($this->collection);
 41      }
 42      public function current()
 43      {
 44          return $this->collection->current();
 45      }
 46      public function key()
 47      {
 48          return $this->collection->key();
 49      }
 50      public function next()
 51      {
 52          return $this->collection->next();
 53      }
 54      public function rewind()
 55      {
 56          $this->collection->rewind();
 57      }
 58      public function valid()
 59      {
 60          return $this->collection->valid();
 61      }
 62      protected $collection;
 63      public function __construct()
 64      {
 65          $this->collection = new MinifierList;
 66          foreach (\func_get_args() as $minifier)
 67              $this->collection->add($minifier);
 68      }
 69      public function minify($src)
 70      {
 71          foreach ($this->collection as $minifier)
 72              try
 73              {
 74                  return $minifier->minify($src);
 75              }
 76              catch (Exception $e)
 77              {
 78                  }
 79          throw new RuntimeException('No minifier available');
 80      }
 81  }