FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\UI\Api\Models\Obligation Class Reference
Collaboration diagram for Fossology\UI\Api\Models\Obligation:
Collaboration graph

Public Member Functions

 __construct ($id, $topic="", $type="", $text="", $classification="", $comment="", $extended=false)
 
 getJSON ()
 
 getArray ()
 
 getTopic ()
 
 getType ()
 
 getText ()
 
 getClassification ()
 
 getComment ()
 
 isModification ()
 
 isTextUpdatable ()
 
 isActive ()
 
 getHash ()
 
 getLicenses ()
 
 getCandidateLicenses ()
 
 getExtended ()
 
 setTopic ($topic)
 
 setType ($type)
 
 setText ($text)
 
 setClassification ($classification)
 
 setComment ($comment)
 
 setModification ($modification)
 
 setTextUpdatable ($textUpdatable)
 
 setActive ($active)
 
 setHash ($hash)
 
 addLicense ($shortname)
 
 addCandidateLicense ($shortname)
 
 setExtended ($extended)
 

Static Public Member Functions

static fromArray ($db, $extended, $licenses, $candidateLicenses)
 

Private Attributes

 $id
 
 $topic
 
 $type
 
 $text
 
 $classification
 
 $comment
 
 $modification
 
 $active
 
 $textUpdatable
 
 $hash
 
 $licenses
 
 $candidateLicenses
 
 $extended
 

Detailed Description

Definition at line 19 of file Obligation.php.

Constructor & Destructor Documentation

◆ __construct()

Fossology\UI\Api\Models\Obligation::__construct (   $id,
  $topic = "",
  $type = "",
  $text = "",
  $classification = "",
  $comment = "",
  $extended = false 
)

Obligation constructor.

Parameters
integer$id
string$topic
string$type
string$text
string$classification
string$comment
boolean$extended

Definition at line 98 of file Obligation.php.

Member Function Documentation

◆ addCandidateLicense()

Fossology\UI\Api\Models\Obligation::addCandidateLicense (   $shortname)

Associate another candidate license

Parameters
string$shortnameCandidate license to add

Definition at line 366 of file Obligation.php.

◆ addLicense()

Fossology\UI\Api\Models\Obligation::addLicense (   $shortname)

Associate another license

Parameters
string$shortnameLicense to add

Definition at line 354 of file Obligation.php.

◆ fromArray()

static Fossology\UI\Api\Models\Obligation::fromArray (   $db,
  $extended,
  $licenses,
  $candidateLicenses 
)
static

From DB array to Obligation object

Parameters
array$dbArray from DB
boolean$extendedExtended info on obligation
array$licensesArray of associated license shortnames
array$candidateLicensesArray of associated candidate license shortnames
Returns
Obligation New obligation object

Definition at line 392 of file Obligation.php.

◆ getArray()

Fossology\UI\Api\Models\Obligation::getArray ( )

Get License element as associative array

Returns
array

Definition at line 126 of file Obligation.php.

◆ getCandidateLicenses()

Fossology\UI\Api\Models\Obligation::getCandidateLicenses ( )
Returns
array

Definition at line 250 of file Obligation.php.

◆ getClassification()

Fossology\UI\Api\Models\Obligation::getClassification ( )

Get the obligation's classification

Returns
string

Definition at line 187 of file Obligation.php.

◆ getComment()

Fossology\UI\Api\Models\Obligation::getComment ( )

Get the comment on the obligation

Returns
string

Definition at line 199 of file Obligation.php.

◆ getExtended()

Fossology\UI\Api\Models\Obligation::getExtended ( )

Get if extended info on obligation

Returns
bool

Definition at line 259 of file Obligation.php.

◆ getHash()

Fossology\UI\Api\Models\Obligation::getHash ( )
Returns
string

Definition at line 234 of file Obligation.php.

◆ getJSON()

Fossology\UI\Api\Models\Obligation::getJSON ( )

JSON representation of the license

Returns
string

Definition at line 117 of file Obligation.php.

◆ getLicenses()

Fossology\UI\Api\Models\Obligation::getLicenses ( )
Returns
array

Definition at line 242 of file Obligation.php.

◆ getText()

Fossology\UI\Api\Models\Obligation::getText ( )

Get the text of the obligation

Returns
string

Definition at line 175 of file Obligation.php.

◆ getTopic()

Fossology\UI\Api\Models\Obligation::getTopic ( )

Get the topic of the obligation

Returns
string

Definition at line 151 of file Obligation.php.

◆ getType()

Fossology\UI\Api\Models\Obligation::getType ( )

Get the type of the obligation

Returns
string

Definition at line 163 of file Obligation.php.

◆ isActive()

Fossology\UI\Api\Models\Obligation::isActive ( )
Returns
bool

Definition at line 226 of file Obligation.php.

◆ isModification()

Fossology\UI\Api\Models\Obligation::isModification ( )
Returns
bool

Definition at line 210 of file Obligation.php.

◆ isTextUpdatable()

Fossology\UI\Api\Models\Obligation::isTextUpdatable ( )
Returns
bool

Definition at line 218 of file Obligation.php.

◆ setActive()

Fossology\UI\Api\Models\Obligation::setActive (   $active)
Parameters
bool$active

Definition at line 334 of file Obligation.php.

◆ setClassification()

Fossology\UI\Api\Models\Obligation::setClassification (   $classification)

Set the obligation's classification

Parameters
string$classification

Definition at line 295 of file Obligation.php.

◆ setComment()

Fossology\UI\Api\Models\Obligation::setComment (   $comment)

Set the comment on the obligation

Parameters
string$comment

Definition at line 304 of file Obligation.php.

◆ setExtended()

Fossology\UI\Api\Models\Obligation::setExtended (   $extended)

Set the extended info on Obligation

Parameters
bool$extended

Definition at line 378 of file Obligation.php.

◆ setHash()

Fossology\UI\Api\Models\Obligation::setHash (   $hash)
Parameters
string$hash

Definition at line 345 of file Obligation.php.

◆ setModification()

Fossology\UI\Api\Models\Obligation::setModification (   $modification)
Parameters
bool$modification

Definition at line 312 of file Obligation.php.

◆ setText()

Fossology\UI\Api\Models\Obligation::setText (   $text)

Set the text of the obligation

Parameters
string$text

Definition at line 286 of file Obligation.php.

◆ setTextUpdatable()

Fossology\UI\Api\Models\Obligation::setTextUpdatable (   $textUpdatable)
Parameters
bool$textUpdatable

Definition at line 323 of file Obligation.php.

◆ setTopic()

Fossology\UI\Api\Models\Obligation::setTopic (   $topic)

Set the topic of the obligation

Parameters
string$topic

Definition at line 268 of file Obligation.php.

◆ setType()

Fossology\UI\Api\Models\Obligation::setType (   $type)

Set the type of the obligation

Parameters
string$type

Definition at line 277 of file Obligation.php.

Member Data Documentation

◆ $active

bool Fossology\UI\Api\Models\Obligation::$active
private

Obligation active

Definition at line 60 of file Obligation.php.

◆ $candidateLicenses

array Fossology\UI\Api\Models\Obligation::$candidateLicenses
private

List of candidate license shortnames associated

Definition at line 80 of file Obligation.php.

◆ $classification

string Fossology\UI\Api\Models\Obligation::$classification
private

Classification of the obligation

Definition at line 45 of file Obligation.php.

◆ $comment

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

Comment on the obligation

Definition at line 50 of file Obligation.php.

◆ $extended

bool Fossology\UI\Api\Models\Obligation::$extended
private

Extended info on the obligation

Definition at line 85 of file Obligation.php.

◆ $hash

string Fossology\UI\Api\Models\Obligation::$hash
private

Hash of obligation text

Definition at line 70 of file Obligation.php.

◆ $id

integer Fossology\UI\Api\Models\Obligation::$id
private

Obligation id

Definition at line 25 of file Obligation.php.

◆ $licenses

array Fossology\UI\Api\Models\Obligation::$licenses
private

List of license shortnames associated

Definition at line 75 of file Obligation.php.

◆ $modification

bool Fossology\UI\Api\Models\Obligation::$modification
private

Applies on modified code

Definition at line 55 of file Obligation.php.

◆ $text

string Fossology\UI\Api\Models\Obligation::$text
private

The text of the obligation

Definition at line 40 of file Obligation.php.

◆ $textUpdatable

bool Fossology\UI\Api\Models\Obligation::$textUpdatable
private

Text updatable

Definition at line 65 of file Obligation.php.

◆ $topic

string Fossology\UI\Api\Models\Obligation::$topic
private

Topic of the obligation

Definition at line 30 of file Obligation.php.

◆ $type

string Fossology\UI\Api\Models\Obligation::$type
private

Type of the obligation

Definition at line 35 of file Obligation.php.


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