Dev Talk

Android global variables

© fangol@sxc.hu

Sometimes we need to define global variables accesible from inside our android application to hold some shared values.
Simplest way to implement this is to subclass Android.app.Application class and define static variables that will hold our data.

Read more

Symfony2 – remember me cookies

© hoefi@sxc.hu

When developing web services for mobile devices to handle user log-in, I had to make it persistent somehow, so the user should not log-in each time when starts mobile application, but I rather wanted log in to be permanent somehow while user does not log-out manually.

Read more

Symfony2 DBAL QueryBuilder

© ba1969@sxc.hu

Sometimes, when we have some relatively complex queries to write, it’s so long and inflexible statement that it’s pretty hard to understand few days after we wrote it, or we have to add some dynamic parameters or conditions that writing plain DBAL statement could be real nightmare …

Read more

Symfony2 DBAL array parameters

© wimster@sxc.hu

Few days ago I had to use DBAL statement that will execute SQL IN(somearray) statement.

Considering that I used Doctrine DBAL in this part of code, I had to find the proper way of doing it.
I wrote some basic things about using Doctrine DBAL inside Symfony2 project, but I didn’t ever need this one before until now …

Read more

Using custom php.ini file with php CLI

© pk2000@sxc.hu

Considering that I have never been real Linux user before, there was few things that I had to learn to successfully handle my code on server through SSH.

One of these things is forcing php CLI to use my custom php.ini file on server.

Let me start this story from beginning …

Read more

Symfony2 global variables in TWIG

© personalfx@sxc.hu

Except well documented TWIG functions like: path(),  asset(), … and custom variables you pass into view from controller when rendering some TWIG template, Symfony2 provides an easy way to access some ‘global’ variables inside TWIG templates without explicitly sending those to the view from controller.

Read more