On a generalization of planar functions