Ian P. Christian's Personal Blog Random witterings from pookey

21Dec/090

Extending sfFileCache with Hashed Directory support

Unfortunately, sfFileCache doesn't scale well on certain file systems as it puts all of it's cached files in one location. This simple class adds support for hashing the directory name based on a the name of the item being cached. It wasn't worth a plugin, so I'm pasting it here.

Continue reading
Filed under: geek, symfony Continue reading
15Dec/090

Sending multipart email from a Task in symfony 1.4

I recently needed to send the result of an action in symfony via email daily. E-mail has changed slightly in symfony 1.3/1.4 - here's how I did it. I really don't like my solution at all, the use of get_partial() from within a Task seems very wrong to me - but I'm in a rush so it will do for now, I'd love to hear feedback

Continue reading
Filed under: geek, php, symfony Continue reading
12Nov/091

Embedded forms using Javascript with sfForm

I wanted to create a form that allowed me to dynamically add sub-forms via JS, without round-trips to the server. I had a bit of a google, but failed to find much of use - so I wrote my own. This article contains my code for a proof of concept, and a brief description of what it does. It is proof of concept, and done as an example, so code isn't done perhaps as I might do in a real configuration, but I hope it provides help to others.

Continue reading
Filed under: geek, symfony Continue reading
10Oct/0912

The BeBook Mini

I've recently got a BeBook Mini, and thought I'd take a little time to upload some pictures and write a few words.

Continue reading
Filed under: bebook, geek Continue reading
18Aug/099

PHP workflows – ezComponents

Workflows are a useful tool to help manage business processes. In this post I take a look at the workflow engine of eZ components, which was developed by Sebastian Bergmann. In this post, I introduce the basics of the workflow engine, and will expand on it's usage in future posts.

Continue reading
Filed under: geek, php Continue reading
29Mar/094

Playing with symfony routing – without symfony

symfony 1.2 was quite an improvement over 1.0, one of the most important changes was improved decoupling between components. In this article we're going to put this to the test and have some fun with sfRouting.

Continue reading
Filed under: geek, php, symfony Continue reading
26Mar/092

Rate Limiting SOAP client in PHP

I've recently had the requirement to rate limit SOAP calls to a remote API, so having done the work I though I'd document it here.

Continue reading
Filed under: geek, php Continue reading
23Mar/091

Using the ‘classmap’ with SOAP in PHP

I've recently done a little bit of SOAP work whilst spec'ing out a project for work - and I noticed that the PHP manual page for SOAP a mention of the 'classmap', which isn't documented so well. I thought I'd put an example here to show it's usage.

Continue reading
Filed under: geek, php Continue reading
21Mar/096

Selecting a random database row

I recently wanted to select a random row from a database, it seemed like a pretty trivial thing to do - but as often the case, it's not as easy as I first expected it to be!

Continue reading
Filed under: geek Continue reading
16Mar/090

STOMPing with PHP – intergration with ActiveMQ

In a previous post, "Playing with ActiveMQ using Maven", I showed how to produce and consume simple messages using Java. In this short post I show how to access these messages from PHP using STOMP.

Continue reading
Filed under: geek, php Continue reading