1. Go to this page and download the library: Download lukaszmakuch/aggregator library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lukaszmakuch / aggregator example snippets
$aggregator = new GroupingAggregator(
new AgeReader(),
new ListAggregator(new NameReader(), ", ")
);
$labelGeneratingVisitor = (new DefaultLabelGeneratorBuilder())
->registerDependency(
PropertyToTextConverterUser::class,
(new ClassBasedTextGeneratorProxy())->registerActualGenerator(
Age::class,
new AgeToTextConverter()
)
)
->registerLabelGeneratorPrototype(
CustomAggregator::class,
new CustomAggregatorLabelGenerator()
)
->build()
;
$presentingVisitor = (new DefaultScalarPresenterBuilder())
->registerDependency(
LabelingVisitorUser::class,
$labelingVisitor
)
->registerExtension(new ExtensionImpl(
CustomAggregator::class,
new CustomAggregatorPresenter(),
"some_custom_aggregator"
))
->build();
$xmlPresenter =
(new DefaultXmlPresenterBuilder())
->registerDependency(
LabelingVisitorUser::class,
$labelingVisitor
)
->registerActualPresenter(
CustomAggregator::class,
new CustomAggregatorXmlPresenter(),
)
->build();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.