Generating statistics using PHP and Zend Framework
I want to build a statistics generator that should be able to use intervals such as hour, day, week, month etc and group on different levels such as customer, campaign, project. I first built this as a standard action function in a controller but I feel I might actually want to break this out and make it a class and make it reusable. Are there any good standards for building these type of statistics generators in a general way?

Add data collections, set interval and set grouping and a start and end date feels like the usage I would be needing.
Generating statistics using PHP and Zend Framework
===

I want to build a statistics generator that should be able to use intervals such as hour, day, week, month etc and group on different levels such as customer, campaign, project. I first built this as a standard action function in a controller but I feel I might actually want to break this out and make it a class and make it reusable. Are there any good standards for building these type of statistics generators in a general way?

Add data collections, set interval and set grouping and a start and end date feels like the usage I would be needing.