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

ResponseCollection.php

Zuletzt modifiziert: 09.10.2024, 12:55 - Dateigröße: 1.85 KiB


 01  <?php
 02  /**
 03   * Zend Framework (http://framework.zend.com/)
 04   *
 05   * @link      http://github.com/zendframework/zf2 for the canonical source repository
 06   * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
 07   * @license   http://framework.zend.com/license/new-bsd New BSD License
 08   */
 09   
 10  namespace Zend\EventManager;
 11   
 12  use SplStack;
 13   
 14  /**
 15   * Collection of signal handler return values
 16   */
 17  class ResponseCollection extends SplStack
 18  {
 19      protected $stopped = false;
 20   
 21      /**
 22       * Did the last response provided trigger a short circuit of the stack?
 23       *
 24       * @return bool
 25       */
 26      public function stopped()
 27      {
 28          return $this->stopped;
 29      }
 30   
 31      /**
 32       * Mark the collection as stopped (or its opposite)
 33       *
 34       * @param  bool $flag
 35       * @return ResponseCollection
 36       */
 37      public function setStopped($flag)
 38      {
 39          $this->stopped = (bool) $flag;
 40          return $this;
 41      }
 42   
 43      /**
 44       * Convenient access to the first handler return value.
 45       *
 46       * @return mixed The first handler return value
 47       */
 48      public function first()
 49      {
 50          return parent::bottom();
 51      }
 52   
 53      /**
 54       * Convenient access to the last handler return value.
 55       *
 56       * If the collection is empty, returns null. Otherwise, returns value
 57       * returned by last handler.
 58       *
 59       * @return mixed The last handler return value
 60       */
 61      public function last()
 62      {
 63          if (count($this) === 0) {
 64              return;
 65          }
 66          return parent::top();
 67      }
 68   
 69      /**
 70       * Check if any of the responses match the given value.
 71       *
 72       * @param  mixed $value The value to look for among responses
 73       * @return bool
 74       */
 75      public function contains($value)
 76      {
 77          foreach ($this as $response) {
 78              if ($response === $value) {
 79                  return true;
 80              }
 81          }
 82          return false;
 83      }
 84  }
 85