php check if class string implements interface