Skip to content

Tag: zend-framework2

ZF2 Doctrine2 repository result as array

I have the problem, that I have two controllers. One is a restful controller which only handles json data and returns a JsonModel, and the other one is a default controller which returns a ViewModel Now I have the problem, that my method only returns an array of entities, which is correct for the default cont…

zf2 change language dynamically

I have one question, about ZF2 Translator, in the specific case in the costruction the link for change langauge dunamically when user click on flag or menu link. In My Application/config/module.config.php i have this code: and my route is: And in my Application/Module.php i set this code on bootstrap: now my …

Get mysql table field names in ZF2

I want to store the csv data dynamically into mysql table. According to my csv columns header i want to insert the data into respective columns in mysql table. For this, I need to get all the table fields name from Zend Framework Controller or Model. I have tried with: ** ** But, it shows the error: Fatal err…