File tree 1 file changed +4
-9
lines changed
1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 9
9
10
10
namespace OxidEsales \GraphQL \Base \Framework ;
11
11
12
- use AppendIterator ;
12
+ use ArrayObject ;
13
13
use Kcs \ClassFinder \Finder \FinderInterface ;
14
14
use Kcs \ClassFinder \Finder \Psr4Finder ;
15
15
use Kcs \ClassFinder \Finder \ReflectionFilterTrait ;
@@ -22,20 +22,15 @@ class Psr4AggregatedFinder implements FinderInterface
22
22
{
23
23
use ReflectionFilterTrait;
24
24
25
- private AppendIterator $ iterator ;
26
-
27
- public function __construct ()
28
- {
29
- $ this ->iterator = new AppendIterator ();
30
- }
25
+ private array $ array = [];
31
26
32
27
public function addFinder (Psr4Finder $ finder ): void
33
28
{
34
- $ this ->iterator -> append ($ finder ->getIterator ());
29
+ $ this ->array = array_merge ( $ this -> array , iterator_to_array ($ finder ->getIterator () ));
35
30
}
36
31
37
32
public function getIterator (): Traversable
38
33
{
39
- return $ this ->iterator ;
34
+ return new ArrayObject ( $ this ->array ) ;
40
35
}
41
36
}
You can’t perform that action at this time.
0 commit comments