programming
Setting defaults on Zend_Form from an object
Samstag, 1. Januar 2011The setDefaults method from Zend_Form expects an array, but sometimes you have an object with getter and setter methods you want to use as default. In this case, you can use a PHP ReflectionObject to extend Zend_Form like this:
Visually debugging XSL-FO stylesheets
Samstag, 20. März 2010When developing XSL-FO stylesheets sooner or later you will see something that doesn't look as intended: It has the wrong margin, padding, line height, floats in the wrong place, etc. If you have no visual debugging tool, the quickest way to check for errors is setting a border or background attribute on the element in question.
Export your database schema for a PHPUnit database test case
Samstag, 24. Januar 2009The PHPUnit database test case allows to create before- and after-states of your database in XML or CSV files. Writing those files can be tedious if you need to describe your complete database schema from scratch and its not a very DRY approach. Fortunately the PHPUnit classes for XML files have methods to persist the database schema. I have written a small shell script for generating the PHPUnit XML schema files from an existing database.
Neueste Kommentare
vor 37 Wochen 6 Tage
vor 38 Wochen 4 Tage
vor 1 Jahr 6 Tage