method = $method; $this->exclude = $exclude; } public function filter(string $property) : bool { $pos = strpos($property, '::'); if ($pos !== false) { $pos += 2; } else { $pos = 0; } return substr($property, $pos) === $this->method ? ! $this->exclude : $this->exclude; } }