FOSSology  4.7.1
Open Source License Compliance by Open Source Software
Fossology\UI\Api\Models\LicenseCompatibilityRule Class Reference

Model to hold a single license compatibility rule. More...

Collaboration diagram for Fossology\UI\Api\Models\LicenseCompatibilityRule:
Collaboration graph

Public Member Functions

 __construct ($id, $firstLicenseId, $firstLicenseName, $secondLicenseId, $secondLicenseName, $firstType, $secondType, $comment, $compatibility)
 
 getId ()
 
 getFirstLicenseId ()
 
 getFirstLicenseName ()
 
 getSecondLicenseId ()
 
 getSecondLicenseName ()
 
 getFirstType ()
 
 getSecondType ()
 
 getComment ()
 
 getCompatibility ()
 
 setId ($id)
 
 setFirstLicenseId ($firstLicenseId)
 
 setFirstLicenseName ($firstLicenseName)
 
 setSecondLicenseId ($secondLicenseId)
 
 setSecondLicenseName ($secondLicenseName)
 
 setFirstType ($firstType)
 
 setSecondType ($secondType)
 
 setComment ($comment)
 
 setCompatibility ($compatibility)
 
 getJSON ($version=ApiVersion::V1)
 
 getArray ($version=ApiVersion::V1)
 

Static Public Member Functions

static fromArray ($row)
 

Private Attributes

 $id
 
 $firstLicenseId
 
 $firstLicenseName
 
 $secondLicenseId
 
 $secondLicenseName
 
 $firstType
 
 $secondType
 
 $comment
 
 $compatibility
 

Detailed Description

Model to hold a single license compatibility rule.

Definition at line 17 of file LicenseCompatibilityRule.php.

Constructor & Destructor Documentation

◆ __construct()

Fossology\UI\Api\Models\LicenseCompatibilityRule::__construct (   $id,
  $firstLicenseId,
  $firstLicenseName,
  $secondLicenseId,
  $secondLicenseName,
  $firstType,
  $secondType,
  $comment,
  $compatibility 
)
Parameters
int$id
int | null$firstLicenseId
string | null$firstLicenseName
int | null$secondLicenseId
string | null$secondLicenseName
string | null$firstType
string | null$secondType
string$comment
boolean$compatibility

Definition at line 76 of file LicenseCompatibilityRule.php.

Member Function Documentation

◆ fromArray()

static Fossology\UI\Api\Models\LicenseCompatibilityRule::fromArray (   $row)
static

Create a new model object from a license_rules row.

Parameters
array$rowRow as returned by CompatibilityDao
Returns
LicenseCompatibilityRule

Definition at line 96 of file LicenseCompatibilityRule.php.

◆ getArray()

Fossology\UI\Api\Models\LicenseCompatibilityRule::getArray (   $version = ApiVersion::V1)

Get the rule as an associative array

Parameters
integer$version
Returns
array

Definition at line 270 of file LicenseCompatibilityRule.php.

◆ getComment()

Fossology\UI\Api\Models\LicenseCompatibilityRule::getComment ( )
Returns
string

Definition at line 170 of file LicenseCompatibilityRule.php.

◆ getCompatibility()

Fossology\UI\Api\Models\LicenseCompatibilityRule::getCompatibility ( )
Returns
boolean

Definition at line 178 of file LicenseCompatibilityRule.php.

◆ getFirstLicenseId()

Fossology\UI\Api\Models\LicenseCompatibilityRule::getFirstLicenseId ( )
Returns
int|null

Definition at line 122 of file LicenseCompatibilityRule.php.

◆ getFirstLicenseName()

Fossology\UI\Api\Models\LicenseCompatibilityRule::getFirstLicenseName ( )
Returns
string|null

Definition at line 130 of file LicenseCompatibilityRule.php.

◆ getFirstType()

Fossology\UI\Api\Models\LicenseCompatibilityRule::getFirstType ( )
Returns
string|null

Definition at line 154 of file LicenseCompatibilityRule.php.

◆ getId()

Fossology\UI\Api\Models\LicenseCompatibilityRule::getId ( )
Returns
int

Definition at line 114 of file LicenseCompatibilityRule.php.

◆ getJSON()

Fossology\UI\Api\Models\LicenseCompatibilityRule::getJSON (   $version = ApiVersion::V1)

JSON representation of the current rule

Parameters
integer$version
Returns
string

Definition at line 260 of file LicenseCompatibilityRule.php.

◆ getSecondLicenseId()

Fossology\UI\Api\Models\LicenseCompatibilityRule::getSecondLicenseId ( )
Returns
int|null

Definition at line 138 of file LicenseCompatibilityRule.php.

◆ getSecondLicenseName()

Fossology\UI\Api\Models\LicenseCompatibilityRule::getSecondLicenseName ( )
Returns
string|null

Definition at line 146 of file LicenseCompatibilityRule.php.

◆ getSecondType()

Fossology\UI\Api\Models\LicenseCompatibilityRule::getSecondType ( )
Returns
string|null

Definition at line 162 of file LicenseCompatibilityRule.php.

◆ setComment()

Fossology\UI\Api\Models\LicenseCompatibilityRule::setComment (   $comment)
Parameters
string$comment

Definition at line 242 of file LicenseCompatibilityRule.php.

◆ setCompatibility()

Fossology\UI\Api\Models\LicenseCompatibilityRule::setCompatibility (   $compatibility)
Parameters
boolean$compatibility

Definition at line 250 of file LicenseCompatibilityRule.php.

◆ setFirstLicenseId()

Fossology\UI\Api\Models\LicenseCompatibilityRule::setFirstLicenseId (   $firstLicenseId)
Parameters
int | null$firstLicenseId

Definition at line 194 of file LicenseCompatibilityRule.php.

◆ setFirstLicenseName()

Fossology\UI\Api\Models\LicenseCompatibilityRule::setFirstLicenseName (   $firstLicenseName)
Parameters
string | null$firstLicenseName

Definition at line 202 of file LicenseCompatibilityRule.php.

◆ setFirstType()

Fossology\UI\Api\Models\LicenseCompatibilityRule::setFirstType (   $firstType)
Parameters
string | null$firstType

Definition at line 226 of file LicenseCompatibilityRule.php.

◆ setId()

Fossology\UI\Api\Models\LicenseCompatibilityRule::setId (   $id)
Parameters
int$id

Definition at line 186 of file LicenseCompatibilityRule.php.

◆ setSecondLicenseId()

Fossology\UI\Api\Models\LicenseCompatibilityRule::setSecondLicenseId (   $secondLicenseId)
Parameters
int | null$secondLicenseId

Definition at line 210 of file LicenseCompatibilityRule.php.

◆ setSecondLicenseName()

Fossology\UI\Api\Models\LicenseCompatibilityRule::setSecondLicenseName (   $secondLicenseName)
Parameters
string | null$secondLicenseName

Definition at line 218 of file LicenseCompatibilityRule.php.

◆ setSecondType()

Fossology\UI\Api\Models\LicenseCompatibilityRule::setSecondType (   $secondType)
Parameters
string | null$secondType

Definition at line 234 of file LicenseCompatibilityRule.php.

Member Data Documentation

◆ $comment

string Fossology\UI\Api\Models\LicenseCompatibilityRule::$comment
private

Description of the rule

Definition at line 58 of file LicenseCompatibilityRule.php.

◆ $compatibility

boolean Fossology\UI\Api\Models\LicenseCompatibilityRule::$compatibility
private

Compatibility result of the rule

Definition at line 63 of file LicenseCompatibilityRule.php.

◆ $firstLicenseId

int null Fossology\UI\Api\Models\LicenseCompatibilityRule::$firstLicenseId
private

Id of the first license of the rule

Definition at line 28 of file LicenseCompatibilityRule.php.

◆ $firstLicenseName

string null Fossology\UI\Api\Models\LicenseCompatibilityRule::$firstLicenseName
private

Short name of the first license of the rule

Definition at line 33 of file LicenseCompatibilityRule.php.

◆ $firstType

string null Fossology\UI\Api\Models\LicenseCompatibilityRule::$firstType
private

License type of the first license of the rule

Definition at line 48 of file LicenseCompatibilityRule.php.

◆ $id

int Fossology\UI\Api\Models\LicenseCompatibilityRule::$id
private

Id of the rule

Definition at line 23 of file LicenseCompatibilityRule.php.

◆ $secondLicenseId

int null Fossology\UI\Api\Models\LicenseCompatibilityRule::$secondLicenseId
private

Id of the second license of the rule

Definition at line 38 of file LicenseCompatibilityRule.php.

◆ $secondLicenseName

string null Fossology\UI\Api\Models\LicenseCompatibilityRule::$secondLicenseName
private

Short name of the second license of the rule

Definition at line 43 of file LicenseCompatibilityRule.php.

◆ $secondType

string null Fossology\UI\Api\Models\LicenseCompatibilityRule::$secondType
private

License type of the second license of the rule

Definition at line 53 of file LicenseCompatibilityRule.php.


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