Category : export-to-csv

i’d like to serialize any entity of my project without knowing the getters inside. And, then, export it to CSV or Json. To do such a simple thing i made this function below, where "entity" is the entity that i’ve received. $donnees = $this->getDoctrine()->getRepository($entity)->findAll(); $rows = array(); $getters = array_filter(get_class_methods($entity), function($method) { return ‘get’ === ..

Read more