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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
ResponseCollection.php
01 <?php
02 /**
03 * Zend Framework (http://framework.zend.com/)
04 *
05 * @link http://github.com/zendframework/zend-eventmanager for the canonical source repository
06 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
07 * @license https://github.com/zendframework/zend-eventmanager/blob/master/LICENSE.md
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 */
36 public function setStopped($flag)
37 {
38 $this->stopped = (bool) $flag;
39 }
40
41 /**
42 * Convenient access to the first handler return value.
43 *
44 * @return mixed The first handler return value
45 */
46 public function first()
47 {
48 return parent::bottom();
49 }
50
51 /**
52 * Convenient access to the last handler return value.
53 *
54 * If the collection is empty, returns null. Otherwise, returns value
55 * returned by last handler.
56 *
57 * @return mixed The last handler return value
58 */
59 public function last()
60 {
61 if (count($this) === 0) {
62 return;
63 }
64 return parent::top();
65 }
66
67 /**
68 * Check if any of the responses match the given value.
69 *
70 * @param mixed $value The value to look for among responses
71 * @return bool
72 */
73 public function contains($value)
74 {
75 foreach ($this as $response) {
76 if ($response === $value) {
77 return true;
78 }
79 }
80 return false;
81 }
82 }
83