clean install

This commit is contained in:
2024-12-10 15:08:16 +01:00
commit e14eb2d8fd
31193 changed files with 3555714 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
<?php
namespace Shaper\Transformation;
use Shaper\Util\Context;
class TransformationsQueue extends \SplQueue implements TransformationInterface, TransformationValidationInterface {
use TransformationValidationTrait;
/**
* {@inheritdoc}
*/
public function transform($data, ?Context $context = NULL) {
if (!isset($context)) {
$context = new Context();
}
$output = $data;
foreach ($this as $transformation) {
$output = $transformation->transform($output, $context);
}
return $output;
}
/**
* {@inheritdoc}
*/
public function getInputValidator() {
/** @var \Shaper\Transformation\TransformationValidationInterface $first_transformation */
$first_transformation = $this->bottom();
return $first_transformation->getInputValidator();
}
/**
* {@inheritdoc}
*/
public function getOutputValidator() {
/** @var \Shaper\Transformation\TransformationValidationInterface $last_transformation */
$last_transformation = $this->top();
return $last_transformation->getOutputValidator();
}
}