FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\Lib\Dao\SpashtDao Class Reference
Collaboration diagram for Fossology\Lib\Dao\SpashtDao:
Collaboration graph

Public Member Functions

 __construct (DbManager $dbManager, Logger $logger)
 
 addComponentRevision ($coordinate, $uploadID)
 
 alterComponentRevision ($coordinate, $uploadID)
 
 getComponent ($uploadID)
 
 getSpashtArs ($uploadID)
 
 updateCopyright ($item, $hash, $content, $action='')
 
 getCoordinateFromCompId ($uploadId)
 Get ClearlyDefined Coordinate if component id is a pURL. More...
 

Private Member Functions

 rowToCoordinate ($row)
 

Private Attributes

 $dbManager
 

Detailed Description

Definition at line 24 of file SpashtDao.php.

Constructor & Destructor Documentation

◆ __construct()

Fossology\Lib\Dao\SpashtDao::__construct ( DbManager  $dbManager,
Logger  $logger 
)
Parameters
DbManager$dbManager
Logger$logger

Definition at line 33 of file SpashtDao.php.

Member Function Documentation

◆ addComponentRevision()

Fossology\Lib\Dao\SpashtDao::addComponentRevision (   $coordinate,
  $uploadID 
)

Add new entry into spasht Agent

Parameters
Coordinate$coordinateCoordinates
integer$uploadIDUpload ID
Returns
integer New id

Definition at line 46 of file SpashtDao.php.

◆ alterComponentRevision()

Fossology\Lib\Dao\SpashtDao::alterComponentRevision (   $coordinate,
  $uploadID 
)

Update the component coordinates in DB

Parameters
Coordinate$coordinateNew coordinates
integer$uploadIDUpload to update
Returns
integer Upload ID on success

Definition at line 73 of file SpashtDao.php.

◆ getComponent()

Fossology\Lib\Dao\SpashtDao::getComponent (   $uploadID)

Get available coordinate in spasht where uploadId is found.

Parameters
integer$uploadIDUpload to search
Returns
Coordinate Coordinate, if found. NULL otherwise.

Definition at line 96 of file SpashtDao.php.

◆ getCoordinateFromCompId()

Fossology\Lib\Dao\SpashtDao::getCoordinateFromCompId (   $uploadId)

Get ClearlyDefined Coordinate if component id is a pURL.

Read component id from Database. If empty or is not a pURL, return NULL. Otherwise parse the pURL and create a Coordinate from it.

Note
pURL does not have type and provide, so they both get same value in coordinate.
Parameters
integer$uploadIdUpload to get Coordinate from.
Returns
null|Coordinate Return null if not pURL, Coordinate otherwise.

Definition at line 197 of file SpashtDao.php.

◆ getSpashtArs()

Fossology\Lib\Dao\SpashtDao::getSpashtArs (   $uploadID)

Get Spasht ars status for Upload id @params integer $uploadId Upload to get information from

Returns
array Row from ARS table

Definition at line 117 of file SpashtDao.php.

◆ rowToCoordinate()

Fossology\Lib\Dao\SpashtDao::rowToCoordinate (   $row)
private

Translate row from DB to Coordinate object

Parameters
array$rowRow from DB
Returns
Fossology::Lib::Data::Spasht::Coordinate Coordinate object

Definition at line 173 of file SpashtDao.php.

◆ updateCopyright()

Fossology\Lib\Dao\SpashtDao::updateCopyright (   $item,
  $hash,
  $content,
  $action = '' 
)

Perform updates on copyrights from ClearlyDefined

Parameters
ItemTreeBounds$itemItem
string$hashCopyright hash
string$contentNew copyright content
string$actionActions ('delete'|'rollback'|nothing=>update)

Definition at line 137 of file SpashtDao.php.


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