PluginProbe
WindPress – Tailwind CSS integration for WordPress / 3.0.13
WindPress – Tailwind CSS integration for WordPress v3.0.13
3.2.91 3.2.92 3.2.90 3.2.89 3.2.88 3.2.87 3.2.86 3.2.85 3.2.84 3.2.83 3.2.82 3.2.81 trunk 3.0.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.17 3.0.2 3.0.3 All 146 releases
windpress / vendor / rosua / leak / src / Leaker.php

Leaker.php in WindPress – Tailwind CSS integration for WordPress 3.0.13, at vendor/rosua/leak/src/Leaker.php

38 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WindPressDeps\Rosua\Leak;
4
5 use ReflectionClass;
6 class Leaker
7 {
8 public object $obj;
9 public ReflectionClass $reflected;
10 public function __construct(object $obj)
11 {
12 $this->obj = $obj;
13 $this->reflected = new ReflectionClass($obj);
14 }
15 public function __get(string $name)
16 {
17 $property = $this->reflected->getProperty($name);
18 $property->setAccessible(\true);
19 return $property->getValue($this->obj);
20 }
21 public function __set(string $name, $value) : void
22 {
23 $property = $this->reflected->getProperty($name);
24 $property->setAccessible(\true);
25 $property->setValue($this->obj, $value);
26 }
27 public function __call(string $name, array $params = [])
28 {
29 $method = $this->reflected->getMethod($name);
30 $method->setAccessible(\true);
31 return $method->invoke($this->obj, ...$params);
32 }
33 public static function __callStatic($name, $arguments)
34 {
35 return self::$name(...$arguments);
36 }
37 }
38