Typed object collection for PHP