public function load(array $fixturesFiles, array $parameters = [], array $objects = [], PurgeMode $purgeMode = null): array
    {
        $errorTracker = new ErrorTracker();
        $filesTracker = new FileTracker(...$fixturesFiles);
        $attempts = 0;
        $set = new ObjectSet(
            new ParameterBag($parameters),
            new ObjectBag($objects)
        );
        while (true) {
            $set = $this->tryToLoadFiles($filesTracker, $errorTracker, $set);
            if ($filesTracker->allFilesHaveBeenLoaded()) {
                break;
            }

            if ($this->maxPass <= $attempts) {
                throw MaxPassReachedException::createForLimit($this->maxPass, $filesTracker, $errorTracker);
            }
            ++$attempts;
        }

        return $set->getObjects();
    }
public function load(array $fixturesFiles, array $parameters = [], array $objects = [], PurgeMode $purgeMode = null): array
    {
        $errorTracker = new ErrorTracker();
        $filesTracker = new FileTracker(...$fixturesFiles);
        $attempts = 0;
        $set = new ObjectSet(
            new ParameterBag($parameters),
            new ObjectBag($objects)
        );
        while (true) {
            $set = $this->tryToLoadFiles($filesTracker, $errorTracker, $set);
            if ($filesTracker->allFilesHaveBeenLoaded()) {
                break;
            }

            if ($this->maxPass <= $attempts) {
                throw MaxPassReachedException::createForLimit($this->maxPass, $filesTracker, $errorTracker);
            }
            ++$attempts;
        }

        return $set->getObjects();
    }
public function load ( array $ fixturesFiles , array $ parameters = [ ] , array $ objects = [ ] , PurgeMode $ purgeMode = null ) : array { $ errorTracker = new ErrorTracker ( ) ; $ filesTracker = new FileTracker ( ... $ fixturesFiles ) ; $ attempts = 0 ; $ set = new ObjectSet ( new ParameterBag ( $ parameters ) , new ObjectBag ( $ objects ) ) ; while ( true ) { $ set = $ this -> tryToLoadFiles ( $ filesTracker , $ errorTracker , $ set ) ; if ( $ filesTracker -> allFilesHaveBeenLoaded ( ) ) { break ; } if ( $ this -> maxPass <= $ attempts ) { throw MaxPassReachedException :: createForLimit ( $ this -> maxPass , $ filesTracker , $ errorTracker ) ; } ++ $ attempts ; } return $ set -> getObjects ( ) ; }
Try to load the set of files in multiple passes by loading as many files as possible. The result of each loading
is passed to the next. After the first pass, if some files could not be reloaded, another attempt is made until
all files are loaded or the maximum number of pass is reached.

{@inheritdoc}

@throws MaxPassReachedException
Try to load the set of files in multiple passes by loading as many files as possible . The result of each loading is passed to the next . After the first pass if some files could not be reloaded another attempt is made until all files are loaded or the maximum number of pass is reached .