Skip to content
Advertisement

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 controller, but my restful controller

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 route http://www.xxxx.com/it/index or http://www.xxxx.com/it/company but i can’t create a

ZF2 Apigility Rest – unable to get multiple params

I’m using Apigility to build my Rest APIs. I want to build have the ability to take in multiple parameters. Such as http://mydomain.com/users/1/activities/4 I now this is possible from this page: https://github.com/zfcampus/zf-apigility/issues/10 I have edit my module route to: ‘route’ => ‘/users/:users_id/activities[/:activities_id]’, But, I don’t know how to retrieve users_id from the url. I tried grabbing the params in my

Can’t connect LDAP server – issue in ldap_bind();

I am tried to implement a LDAP authentication in my web application developed in ZF2. LDAP authentication is working fine in Windows 7. But, after moving the application to LINUX machine, LDAP authentication is not working. I am always getting the error as : Warning: ldap_bind(): Unable to bind to server: Can’t contact LDAP server in LdapConnect.php on line 20

PHP retrieving array values using dash arrow “->”

I’ve been using PHP quite a while now, but never been an advanced programmer. I feel like this is dumb question but never understood why some array values can be retrieved using different methods: This: rather than normal: The standard $array[‘value’] always works, but the one using the -> method doesn’t at times. Why is that? Here’s an example. I

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 error: Class

Advertisement