PHP 5.3 does not allow $this to be used directly in closures