public static function getExtendeeClassName(FieldDescriptorProto $field) { if (getenv("PEAR_STYLE") || $field->file()->getOptions()->getExtension("php")->getStyle() == Style::PEAR) { return str_replace(".", "_", preg_replace("/^.+/", ".", $field->getExtendee())); } else { return str_replace(".", "\\", $field->getExtendee()); } }