class for decorate arrays in php