FOSSology  4.7.1
Open Source License Compliance by Open Source Software
MultiComparePlugin Class Reference
Inheritance diagram for MultiComparePlugin:
Inheritance graph
Collaboration diagram for MultiComparePlugin:
Collaboration graph

Public Attributes

const NAME = 'multicompare'
 
- Public Attributes inherited from Fossology\Lib\Plugin\DefaultPlugin
const PERMISSION = "permission"
 
const REQUIRES_LOGIN = "requiresLogin"
 
const ENABLE_MENU = "ENABLE_MENU"
 
const LEVEL = "level"
 
const DEPENDENCIES = "dependencies"
 
const INIT_ORDER = "initOrder"
 
const MENU_LIST = "menuList"
 
const MENU_ORDER = "menuOrder"
 
const MENU_TARGET = "menuTarget"
 
const TITLE = "title"
 
 $fileLogger
 

Protected Member Functions

 handle (Request $request)
 
- Protected Member Functions inherited from Fossology\Lib\Plugin\DefaultPlugin
 RegisterMenus ()
 Customize submenus.
 
 render ($templateName, $vars=null, $headers=null)
 
 getDefaultHeaders ()
 
 getDefaultVars ()
 
 mergeWithDefault ($vars)
 
 flushContent ($content)
 

Private Member Functions

 createFilePickerMultiTable ()
 
 GetTreeInfo (int $uploadtree_pk)
 
 batchAgentPks (int $uploadPk)
 
 AddDataStr (array $treeInfo, array &$children, string $mode)
 
 FilterN (string $filter, array &$Master, int $N)
 
 filterSamehashN (array &$Master, int $N)
 
 filterSamelicN (array &$Master, int $N)
 
 filterSamelicFuzzyN (array &$Master, int $N)
 
 filterNolicsN (array &$Master)
 
 filterAllsame (array &$Master, int $N)
 
 ChildElt (array $child, int $colIdx, array $row, array $treeInfoArray, string $mode, int $baseline)
 
 ItemComparisonRows (array $Master, array $treeInfoArray, string $mode, int $baseline, string $view)
 
 FileMatrixRows (array $Master, int $N)
 
 buildSummaryData (array $Master, int $N, array $treeInfoArray, string $mode)
 
 buildHistData (array $items, array $treeInfoArray, string $mode)
 

Private Attributes

 $dbManager
 
 $uploadDao
 
 $agentDao
 

Additional Inherited Members

- Public Member Functions inherited from Fossology\Lib\Plugin\DefaultPlugin
 __construct ($name, $parameters=array())
 
 getName ()
 
 getVersion ()
 
 getTitle ()
 
 isRequiresLogin ()
 
 getDependency ()
 
 getPluginLevel ()
 
 getDBaccess ()
 
 getState ()
 
 getInitOrder ()
 
 getNoMenu ()
 
 getResponse ()
 
 getObject ($name)
 
 preInstall ()
 
 postInstall ()
 
 unInstall ()
 
 execute ()
 
 isLoggedIn ()
 
 __get ($name)
 
 __toString ()
 
- Protected Attributes inherited from Fossology\Lib\Plugin\DefaultPlugin
 $container
 
 $renderer
 
 $microMenu
 

Detailed Description

Definition at line 21 of file MultiComparePlugin.php.

Member Function Documentation

◆ AddDataStr()

MultiComparePlugin::AddDataStr ( array  $treeInfo,
array &  $children,
string  $mode 
)
private

Populate dataarray and datastr on every child for the given mode. License and copyright/ECC data are fetched in single batch queries (one per column) instead of one query per child.

Definition at line 175 of file MultiComparePlugin.php.

◆ batchAgentPks()

MultiComparePlugin::batchAgentPks ( int  $uploadPk)
private

Fetch the latest successful agent_fk for all five ARS tables in one query. A per-process static cache avoids redundant existsTable checks.

Returns
array Keys: nomos_agent_pk, monk_agent_pk, ojo_agent_pk, copyright_agent_pk, ecc_agent_pk

Definition at line 125 of file MultiComparePlugin.php.

◆ buildHistData()

MultiComparePlugin::buildHistData ( array  $items,
array  $treeInfoArray,
string  $mode 
)
private

Run histogram queries and return structured data for the Twig histogram table. Returns [entry => [colIdx => count], ...] sorted by total descending.

Definition at line 619 of file MultiComparePlugin.php.

◆ buildSummaryData()

MultiComparePlugin::buildSummaryData ( array  $Master,
int  $N,
array  $treeInfoArray,
string  $mode 
)
private

Build the per-column summary data for the Twig summary panel. Called on the UNFILTERED master for accurate counts. O(M·N·K) — no inner N² scan; uses per-row key-count tables instead.

Definition at line 555 of file MultiComparePlugin.php.

◆ ChildElt()

MultiComparePlugin::ChildElt ( array  $child,
int  $colIdx,
array  $row,
array  $treeInfoArray,
string  $mode,
int  $baseline 
)
private

Render

pair for one cell: filename+data badges + links.

Definition at line 422 of file MultiComparePlugin.php.

◆ filterAllsame()

MultiComparePlugin::filterAllsame ( array &  $Master,
int  $N 
)
private

Remove rows where all N columns are present and report identical data.

Definition at line 404 of file MultiComparePlugin.php.

◆ filterNolicsN()

MultiComparePlugin::filterNolicsN ( array &  $Master)
private

Remove rows where every present column has no meaningful data. For license mode this is "No_license_found"; for other modes it is an empty datastr.

Definition at line 380 of file MultiComparePlugin.php.

◆ filterSamehashN()

MultiComparePlugin::filterSamehashN ( array &  $Master,
int  $N 
)
private

Remove rows where all N columns have the same pfile_fk (identical content). Rows with missing columns are kept because the absence is itself a difference.

Definition at line 325 of file MultiComparePlugin.php.

◆ filterSamelicFuzzyN()

MultiComparePlugin::filterSamelicFuzzyN ( array &  $Master,
int  $N 
)
private

Like filterSamelicN but uses fuzzy filename comparison.

Definition at line 361 of file MultiComparePlugin.php.

◆ filterSamelicN()

MultiComparePlugin::filterSamelicN ( array &  $Master,
int  $N 
)
private

Remove rows where all N columns are present, share the same filename, and carry identical data.

Definition at line 344 of file MultiComparePlugin.php.

◆ GetTreeInfo()

MultiComparePlugin::GetTreeInfo ( int  $uploadtree_pk)
private

Return uploadtree info + all relevant agent pks for one tree node. Uses the upload-specific table (uploadtree_tablename) when available, falling back to the parent uploadtree table for the bootstrap query.

Definition at line 70 of file MultiComparePlugin.php.

◆ handle()

MultiComparePlugin::handle ( Request  $request)
protected
Parameters
Request$request
Returns
Response

Reimplemented from Fossology\Lib\Plugin\DefaultPlugin.

Definition at line 714 of file MultiComparePlugin.php.

◆ ItemComparisonRows()

MultiComparePlugin::ItemComparisonRows ( array  $Master,
array  $treeInfoArray,
string  $mode,
int  $baseline,
string  $view 
)
private

Render all table body rows (diff or matrix view).

Definition at line 484 of file MultiComparePlugin.php.


The documentation for this class was generated from the following file: