src/Loaders/ProposedOkFilenameLoader.php
/**
     * Loads, sorts and returns the files by using the passed glob pattern.
     *
     * If no pattern will be passed to the `load()` method, the files of
     * the actual directory using `getcwd()` will be returned.
     *
     * @param string|null $pattern The pattern to load the files from the filesystem
     *
     * @return array The array with the data
     */
Loads, sorts and returns the files by using the passed glob pattern.
If no pattern will be passed to the `load()` method, the files of
the actual directory using `getcwd()` will be returned.

@param string|null $pattern The pattern to load the files from the filesystem

@return array The array with the data
Loads sorts and returns the files by using the passed glob pattern . If no pattern will be passed to the ` load () ` method the files of the actual directory using ` getcwd () ` will be returned . @param string|null $pattern The pattern to load the files from the filesystem @return array The array with the data
public function load(string $pattern = null) : array
    {
        $this->getLoader()->addFilter(new PregMatchFilter($this->getPattern()));
        $this->getLoader()->load($pattern);
        $okFilenames = array();
        $patternKeys = $this->getPatternKeys();
        for ($i = 1; $i <= sizeof($patternKeys); $i++) {
            $keys = array();
            for ($z = 0; $z < $i; $z++) {
                $keys[] = $patternKeys[$z];
            }
            $okFilenames = array_merge_recursive($okFilenames, $this->proposedOkFilenamesByKeys($keys));
        }
        $this->getFilterImpl()->filter($okFilenames);
        $this->getSorterImpl()->sort($okFilenames);
        return $okFilenames;
    }
public function load ( string $ pattern = null ) : array { $ this -> getLoader ( ) -> addFilter ( new PregMatchFilter ( $ this -> getPattern ( ) ) ) ; $ this -> getLoader ( ) -> load ( $ pattern ) ; $ okFilenames = array ( ) ; $ patternKeys = $ this -> getPatternKeys ( ) ; for ( $ i = 1 ; $ i <= sizeof ( $ patternKeys ) ; $ i ++ ) { $ keys = array ( ) ; for ( $ z = 0 ; $ z < $ i ; $ z ++ ) { $ keys [ ] = $ patternKeys [ $ z ] ; } $ okFilenames = array_merge_recursive ( $ okFilenames , $ this -> proposedOkFilenamesByKeys ( $ keys ) ) ; } $ this -> getFilterImpl ( ) -> filter ( $ okFilenames ) ; $ this -> getSorterImpl ( ) -> sort ( $ okFilenames ) ; return $ okFilenames ; }
Loads, sorts and returns the files by using the passed glob pattern.
Loads sorts and returns the files by using the passed glob pattern .
// load the pattern to filter the available CSV files with. We filter // the .CSV files to only get those that matches the prefix. // load the available CSV files and initialize the matches that // we need to create the list with the proposed .OK files // initialize the array for the available okFilenames // load the pattern keys (prefix, filename and suffix), // that has to be used from the configuration // prepare the .OK filenames based on the found CSV file information // initialize the array for the pattern that has to used to load // the propsed .OK file for // load the parts from the matches // merge the proposed .OK filenames for the passed keys into the array // finally, we filter and sort them with the configured behaviour // prepare and return the pattern for the OK file