private function SortFilesByVersion(array $files)
    {
        $result = array();
        $foreignKeysFile = '';
        foreach ($files as $file)
        {
            if ($file == 'foreign-keys.sql')
            {
                $foreignKeysFile = $file;
                continue;
            }
            $version = Path::RemoveExtension($file);
            if ($this->installedVersion && version_compare($version, $this->installedVersion) <= 0)
            {
                continue;
            }
            $result[$version] = $file;
        }
        uksort($result, "version_compare");
        if ($foreignKeysFile)
        {
            $result[] = $foreignKeysFile;
        }
        return $result;
    }
private function SortFilesByVersion(array $files)
    {
        $result = array();
        $foreignKeysFile = '';
        foreach ($files as $file)
        {
            if ($file == 'foreign-keys.sql')
            {
                $foreignKeysFile = $file;
                continue;
            }
            $version = Path::RemoveExtension($file);
            if ($this->installedVersion && version_compare($version, $this->installedVersion) <= 0)
            {
                continue;
            }
            $result[$version] = $file;
        }
        uksort($result, "version_compare");
        if ($foreignKeysFile)
        {
            $result[] = $foreignKeysFile;
        }
        return $result;
    }
private function SortFilesByVersion ( array $ files ) { $ result = array ( ) ; $ foreignKeysFile = '' ; foreach ( $ files as $ file ) { if ( $ file == 'foreign-keys.sql' ) { $ foreignKeysFile = $ file ; continue ; } $ version = Path :: RemoveExtension ( $ file ) ; if ( $ this -> installedVersion && version_compare ( $ version , $ this -> installedVersion ) <= 0 ) { continue ; } $ result [ $ version ] = $ file ; } uksort ( $ result , "version_compare" ) ; if ( $ foreignKeysFile ) { $ result [ ] = $ foreignKeysFile ; } return $ result ; }
Sorts files by version
@param string[] $files The files
@return string[] Returns the sorted files
Sorts files by version