Oct 2013

Migrating to Mouf 2-beta 3 / Splash 4.2

Mouf 2 is getting near the stable release.

In the latest release, a few things have changed that might break your old application, so here is a very simple migration guide.

First of all, the ROOT_URL constant is no more declared in config.php. Instead, if you are using Splash, it will be automatically created for you. When migrating, to Splash 4.2 and Mouf 2-beta 3, you will have an error

Aug 2013

New in Mouf: a patch management system

Another great week for Mouf! We now have support for patches (and especially database patches).

So far, dealing with database schema changes in multiple environments involved writing an SQL file and applying it to every database in use. Of course, you had to do this manually, and it was error-prone.

Here comes Mouf's patcher. This patch system

Aug 2013

New in Mouf: a rendering system

This has been a big week for Mouf. Amongst the many packages that have been added this week, I'm proud to announce a brand new "html.renderer". This is a package (PHP 5.4+) that allow you to easily make your objects renderable in HTML.

The rendering system allows you to overload templates provided by package developers. It is a simple, yet powerful sy

Jun 2013

Mouf is getting traits injection support

Mouf 2 final release is approaching. Today, Mouf is getting support for injection in properties or setters defined in traits (that have been added in PHP 5.4).

Adding support for traits was less straightforward that initially thought (due to a strange behaviour of the Reflection API), but we hopefully found a workaround. You can now use a trait in your class

Jun 2013

Diving into the strange world of PHP Reflection API

Being a Mouf developer, I have been quite heavily relying on the PHP Reflection API, and so far, I must say things were quite ok.

PHP provides a nice API to access your code structure through ReflectionClass, ReflectionMethod, ReflectionProperty, etc...

Recently, I started adding support for traits in Mouf. This means that I need to do some reflection on traits. In particular, I need to answer this question: