CycloneDX Library

LicenseFactory
in package

License Factory.

Tags
author

jkowalleck

Table of Contents

Properties

$licenseIdentifiers  : LicenseIdentifiers
$spdxLicenseExpressionValidator  : SpdxLicenseExpressionValidatorStub
SPDX License Expression validator.

Methods

__construct()  : mixed
getLicenseIdentifiers()  : LicenseIdentifiers
getSpdxLicensesExpressionValidator()  : SpdxLicenseExpressionValidatorStub
makeDisjunctive()  : SpdxLicense|NamedLicense
makeExpression()  : LicenseExpression
makeFromString()  : SpdxLicense|LicenseExpression|NamedLicense
makeNamedLicense()  : NamedLicense
makeSpdxLicense()  : SpdxLicense

Properties

$spdxLicenseExpressionValidator read-only

SPDX License Expression validator.

private SpdxLicenseExpressionValidatorStub $spdxLicenseExpressionValidator

Something compatible with SpdxLicenseExpressionValidator.

Cannot use Type Constraints, to be compatible with 3rd party implementations on runtime.

Methods

__construct()

public __construct(LicenseIdentifiers $licenseIdentifiers, object $spdxLicenseExpressionValidator) : mixed
Parameters
$licenseIdentifiers : LicenseIdentifiers
$spdxLicenseExpressionValidator : object

Something compatible with SpdxLicenseExpressionValidatorStub

getSpdxLicensesExpressionValidator()

public getSpdxLicensesExpressionValidator() : SpdxLicenseExpressionValidatorStub
Return values
SpdxLicenseExpressionValidatorStub

makeSpdxLicense()

public makeSpdxLicense(string $license) : SpdxLicense
Parameters
$license : string
Tags
throws
DomainException

when the SPDX license ID is unknown

Return values
SpdxLicense

        
On this page

Search results