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