Herzult/SimplePHPEasyPlus — pull request #13 by igorw (2013-03-09 16:53:34+00:00)
Title: Introduce simple NumberCollectionBuilder to simplify collection creation

This CollectionBuilder can take factories for the SimpleNumberStringParser,
the Number (usually a SimpleNumberFactory) and the CollectionItemNumberProxy.

For each added number, it will get an instance of each of these from the
factory, to build the CollectionItems that are then added to the
NumberCollection.

This change includes full test coverage.

This should vastly simplify the construction of NumberCollections.

Sample usage:

$numberCollectionBuilder = new NumberCollectionBuilder(
new SimpleNumberStringParserFactory(),
new SimpleNumberFactory(),
new CollectionItemNumberProxyFactory()
);
$numberCollectionBuilder->add('2');
$numberCollectionBuilder->add('3');

$numberCollection = $numberCollectionBuilder->resolve();