for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Knp\DictionaryBundle\ValueTransformer;
use Knp\DictionaryBundle\ValueTransformer;
final class Aggregate implements ValueTransformer
{
/**
* @var array<ValueTransformer>
*/
private array $transformers = [];
public function addTransformer(ValueTransformer $valueTransformer): void
$this->transformers[] = $valueTransformer;
}
public function supports(mixed $value): bool
foreach ($this->transformers as $transformer) {
if ($transformer->supports($value)) {
return true;
return false;
public function transform(mixed $value)
return $transformer->transform($value);
return $value;