Ferdinand Kuhl
0de901d45c
Some checks failed
ci/woodpecker/push/code-style Pipeline was successful
ci/woodpecker/push/functional-tests/1 Pipeline failed
ci/woodpecker/push/functional-tests/2 Pipeline failed
ci/woodpecker/push/functional-tests/3 Pipeline failed
ci/woodpecker/push/functional-tests/4 Pipeline failed
21 lines
392 B
PHP
21 lines
392 B
PHP
<?php
|
|
|
|
namespace DigiComp\FluidRenderFunctions\Utils;
|
|
|
|
class GeneratorClosureIterator implements \IteratorAggregate
|
|
{
|
|
private \Closure $closure;
|
|
|
|
/**
|
|
* @param \Closure $closure
|
|
*/
|
|
public function __construct(\Closure $closure)
|
|
{
|
|
$this->closure = $closure;
|
|
}
|
|
|
|
public function getIterator(): \Generator
|
|
{
|
|
return ($this->closure)();
|
|
}
|
|
}
|