private function isExistingPublicMethod($object, $method) { if (!method_exists($object, $method)) { return false; } $methodReflection = new ReflectionMethod($object, $method); return $methodReflection->isPublic(); }