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 |
InvalidProxiedClassException.php
01 <?php
02
03 declare(strict_types=1);
04
05 namespace ProxyManager\Exception;
06
07 use InvalidArgumentException;
08 use ReflectionClass;
09 use ReflectionMethod;
10
11 /**
12 * Exception for invalid proxied classes
13 *
14 * @author Marco Pivetta <ocramius@gmail.com>
15 * @license MIT
16 */
17 class InvalidProxiedClassException extends InvalidArgumentException implements ExceptionInterface
18 {
19 public static function interfaceNotSupported(ReflectionClass $reflection) : self
20 {
21 return new self(sprintf('Provided interface "%s" cannot be proxied', $reflection->getName()));
22 }
23
24 public static function finalClassNotSupported(ReflectionClass $reflection) : self
25 {
26 return new self(sprintf('Provided class "%s" is final and cannot be proxied', $reflection->getName()));
27 }
28
29 public static function abstractProtectedMethodsNotSupported(ReflectionClass $reflection) : self
30 {
31 return new self(sprintf(
32 'Provided class "%s" has following protected abstract methods, and therefore cannot be proxied:' . "\n%s",
33 $reflection->getName(),
34 implode(
35 "\n",
36 array_map(
37 function (ReflectionMethod $reflectionMethod) : string {
38 return $reflectionMethod->getDeclaringClass()->getName() . '::' . $reflectionMethod->getName();
39 },
40 array_filter(
41 $reflection->getMethods(),
42 function (ReflectionMethod $method) : bool {
43 return $method->isAbstract() && $method->isProtected();
44 }
45 )
46 )
47 )
48 ));
49 }
50 }
51