php check if instance implements interface