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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
MethodMatchFilter.php
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 namespace Zend\Stdlib\Hydrator\Filter;
10
11 class MethodMatchFilter implements FilterInterface
12 {
13 /**
14 * The method to exclude
15 * @var string
16 */
17 protected $method = null;
18
19 /**
20 * Either an exclude or an include
21 * @var bool
22 */
23 protected $exclude = null;
24
25 /**
26 * @param string $method The method to exclude or include
27 * @param bool $exclude If the method should be excluded
28 */
29 public function __construct($method, $exclude = true)
30 {
31 $this->method = $method;
32 $this->exclude = $exclude;
33 }
34
35 public function filter($property)
36 {
37 $pos = strpos($property, '::');
38 if ($pos !== false) {
39 $pos += 2;
40 } else {
41 $pos = 0;
42 }
43 if (substr($property, $pos) === $this->method) {
44 return !$this->exclude;
45 }
46 return $this->exclude;
47 }
48 }
49