Tag: PHP

This is a quick code example on how to extend the Symfony security extension in your bundle so you could have rules on the controller’s class as annotation and also inherit those and merge with the action method annotations. It's …

Symfony security annotation on controller class and inherited action method Read More »

Tagged with: , , ,

I was playing with PHP the other day and was trying to fetch and rename 1000s of files I have stored locally on my machine. Seemingly PHP isn’t the best language to that operation Python or even BASH could do …

Get All Files in Directory and All Child Directories Read More »

Tagged with: , , , , ,

Dates as a concept are seamingly simple and straight forward. Though in programming world those could be rather complex starting from format, representation, time zones, machine default configuration going through different calendars and date manipulations. In this post I won’t …

Change default date for Jackson in Spring Boot application Read More »

Tagged with: , , , , , ,

When I build apps or add new functionality to Symfony2 I build it into a separate bundle, thus trying to keep the structure modular which is generally a good practice as everyone knows. Keeping all parts of the bundle together …

Load configurations from custom bundle in Symfony2 Read More »

Tagged with: , , ,

It’s really interesting how small changes in core PHP functionality could break whole website and take hours to find the cause of the bug. I am building website which takes some use of dates, stored in MySQL database as Date …

Consistent dates in PHP? Read More »

Tagged with: , , ,

In this quick tip I’ll show you how to install the PHP extensionmcrypt. This is needed for Magento to run properly otherwise you’ll get an error like: [cc type=”text” escaped=”true”]Fatal error: Call to undefined function mcrypt_create_iv() in lib/Varien/Crypt/Mcrypt.php on line 64[/cc] …

Install PHP mcrypt on UNIX server Read More »

Tagged with: ,

In the general case the website caching happens on the server side where the PHP output or database objects are cached in static files or in the server RAM. That could work pretty good but we could improve that and …

HTTP cache control on a dynamic PHP page Read More »

Tagged with: , , ,

Here’s a quick and dirty utility method for type checking an object or an array of objects. [cc escaped=”true” lang=”php”]/** * Ensure the object (or the first item in the * array of objects) is of the specified type * …

PHP Type Checking Read More »

Tagged with: , , ,

Joomla provides very useful class called JHTML that can be used to produce different HTML elements saving us time and code. The Joomla team has provided a very useful class loader method “_()” in which we can pass string for …

Generate radio grpoup with JHTML Read More »

Tagged with: , , , ,

Hello guys! This is my firs post so I’ll keep it short for now. I could say I am newbie with CakePHP framework. I’ve been working with it just for a couple of weeks so far but I think it’s …

CakePHP – User authentication and registration Read More »

Tagged with: , , , ,