FOSSology  4.7.1
Open Source License Compliance by Open Source Software
common-multicompare.php File Reference

N-way file matching and link generation for multi-component comparison. More...

Go to the source code of this file.

Functions

 _mcIndexRemove (array &$idx, string $val, $key)
 Remove one key from a name-index bucket list (used by MakeMasterN).
 
 _mcFindBestMatch (array $child, array $pool, array &$byName, array &$byFuzzyExt, array &$byFuzzy)
 Hashmap-accelerated best-match (O(1) for stages 1, 2, 4; O(M) only for rare stage 3). More...
 
 MakeMasterN (array $ChildrenArrays)
 Build the master array for N file lists using hashmap-based O(M·N) matching. More...
 
 GetDiffLinkN (array $MasterRow, int $colIdx, int $agentPk, string $filter, string $pluginName, array $items, string $mode, int $baseline)
 Generate the navigation link for one cell in the multi-component table. More...
 
 FileListN (array &$Master, array $agentPks, string $filter, string $pluginName, array $items, string $mode, int $baseline)
 Attach linkurl to every cell in Master (N-way version of FileList()). More...
 
 Dir2BrowseDiffN (array $path, string $filter, int $colIdx, string $pluginName, array $items, string $mode, int $baseline)
 Render the folder/path breadcrumb banner for one column. More...
 

Detailed Description

N-way file matching and link generation for multi-component comparison.

Definition in file common-multicompare.php.

Function Documentation

◆ _mcFindBestMatch()

_mcFindBestMatch ( array  $child,
array  $pool,
array &  $byName,
array &  $byFuzzyExt,
array &  $byFuzzy 
)

Hashmap-accelerated best-match (O(1) for stages 1, 2, 4; O(M) only for rare stage 3).

Returns
int|string|null pool key or null

Definition at line 37 of file common-multicompare.php.

◆ Dir2BrowseDiffN()

Dir2BrowseDiffN ( array  $path,
string  $filter,
int  $colIdx,
string  $pluginName,
array  $items,
string  $mode,
int  $baseline 
)

Render the folder/path breadcrumb banner for one column.

Parameters
array$pathDir2Path result for this column
string$filterCurrent filter
int$colIdxThis column's index
string$pluginNamePlugin name for URL building
array$itemsCurrent items (uploadtree_pk per column)
string$mode'license'|'copyright'|'ecc'
int$baseline0 or 1-based
Returns
string HTML

Definition at line 282 of file common-multicompare.php.

◆ FileListN()

FileListN ( array &  $Master,
array  $agentPks,
string  $filter,
string  $pluginName,
array  $items,
string  $mode,
int  $baseline 
)

Attach linkurl to every cell in Master (N-way version of FileList()).

Parameters
array$MasterMaster rows (modified in place)
array$agentPksAgent pk per column (indexed by colIdx)
string$filterCurrent filter
string$pluginNamePlugin name for URL building
array$itemsCurrent items (uploadtree_pk per column)
string$mode'license'|'copyright'|'ecc'
int$baseline0 or 1-based column index

Definition at line 252 of file common-multicompare.php.

◆ GetDiffLinkN()

GetDiffLinkN ( array  $MasterRow,
int  $colIdx,
int  $agentPk,
string  $filter,
string  $pluginName,
array  $items,
string  $mode,
int  $baseline 
)

Generate the navigation link for one cell in the multi-component table.

Parameters
array$MasterRowFull master row (indexed by colIdx)
int$colIdxColumn index of the cell being rendered
int$agentPkAgent pk for this column
string$filterCurrent filter value
string$pluginNamePlugin name used for URL (e.g. 'multicompare')
array$itemsCurrent items array (uploadtree_pk per column)
string$mode'license'|'copyright'|'ecc'
int$baseline0 = none, 1-based column index
Returns
string HTML link string

Definition at line 176 of file common-multicompare.php.

◆ MakeMasterN()

MakeMasterN ( array  $ChildrenArrays)

Build the master array for N file lists using hashmap-based O(M·N) matching.

Parameters
array$ChildrenArraysIndexed array: $ChildrenArrays[$colIdx] = children list
Returns
array Master rows

Definition at line 90 of file common-multicompare.php.