Akrabat - akrabat.com - Rob Allen's DevNotes
General Information:
Latest News:
Setting up Zend Server 6 on OS X for PHP development 12 Aug 2013 | 01:38 pm
I recently decided to upgrade my Mac's PHP to 5.4. One of the available options is Zend Server 6.1, Free edition. These are my notes how to set it up so that it works the way I develop. Installation ...
Password less command line scripts with MySQL 5.6 5 Aug 2013 | 12:26 pm
I have a number of command line scripts that copy MySQL databases down from staging servers and store them locally. These scripts set the password on the command line using the -p option. With MySQL ...
Configuring a ZF2 view helper before rendering 31 Jul 2013 | 12:51 pm
The currencyFormat view helper is very easy to use: When I was reading the documentation for the currencyFormat view helper, I discovered that you could configure the currency code and locale once ra...
Using PHP's NumberFormatter to format currencies 29 Jul 2013 | 12:03 pm
I've been using number_format() for a very long time, but recently discovered that within the intl extension there's a NumberFormatter class available too. This is quite a clever class as it is Locale...
Returning a ZF2 HydratingResultSet when starting with raw SQL 24 Jul 2013 | 01:24 pm
If you're using Zend Framework 2's Zend\Db and want to write raw SQL that returns a HydratingResultSet, then you can do this: When you iterate over the HydratingResultSet, you get a populated instanc...
Displaying the generated SQL from a Zend\Db\Sql object 17 Jul 2013 | 12:10 pm
If you use Zend\Db\Sql to generate your SQL, then it's useful to find out what the generated SQL looks like. Consider code like this: To find out what the generated SQL will look like, you can use t...
IN and Zend\Db\Sql's where() 15 Jul 2013 | 12:40 pm
This is a short note to myself. Zend\Db\Sql objects allow you to do this: which generates the (My)SQL: If you want the SQL generated to use the IN operator, then just pass in an array: which genera...
Caching your ZF2 merged configuration 19 Jun 2013 | 01:12 pm
Zend Framework 2's ModuleManager has the ability to cache the merged configuration information for your application. This is very useful as it allows you to separate out your configuration within the ...
Contracts and NDAs for Nineteen Feet 15 Jun 2013 | 05:07 pm
Now that I have my own business, I've become an avid listener to the Unfinished Business podcast presented by Anna Debenham and Andy Clarke. From the first episode, they have emphasised the importance...
Injecting configuration into a ZF2 controller 30 Apr 2013 | 01:01 pm
One thing you may find yourself needing to do is access configuration information in a controller or service class. The easiest way to do this is to use the ServiceManger's initialiser feature. This ...