Design patterns implemented using traits in PHP 5.4