Tag
PHP Framework
4 posts tagged PHP Framework.
Posts

04/02/2015
How to show or access cookie values in Symfony Twig views
Strange how obscure it is to find a clear example of how to just access or show the value of a cookie in Twig, so here it is!

03/24/2015
Doctrine field type mappings: tinyint is a boolean
When Doctrine reads a MySQL schema, every tinyint becomes boolean whatever its declared length. The full type table, and two ways to keep a small integer an integer.

01/01/2015
Reading the current locale in Symfony
The locale lives on the Request, not in a global. How to reach it from a controller, from a service that has no request, and from a template - and where it is set before any of that.

01/01/2015
Limiting a Doctrine query with setMaxResults
Here is an example of a simple DQL query in a custom repository method meant to return a single array result. The following will return the latest result in case there are multiple contact records that match the…