Component
in package
Tags
Table of Contents
Properties
- $author : string|null
- The person(s) or organization(s) that authored the component.
- $bomRef : BomRef
- An optional identifier which can be used to reference the component elsewhere in the BOM. Every bom-ref should be unique.
- $copyright : string|null
- A copyright notice informing users of the underlying claims to copyright ownership in a published work.
- $dependencies : BomRefRepository
- References to dependencies.
- $description : string|null
- Specifies a description for the component.
- $evidence : ComponentEvidence|null
- Provides the ability to document evidence collected through various forms of extraction or analysis.
- $externalReferences : ExternalReferenceRepository
- Provides the ability to document external references related to the component or to the project the component describes.
- $group : string|null
- The grouping name or identifier. This will often be a shortened, single name of the company or project that produced the component, or the source package or domain name.
- $hashes : HashDictionary
- Specifies the file hashes of the component.
- $licenses : LicenseRepository
- licence(s).
- $name : string
- The name of the component. This will often be a shortened, single name of the component.
- $packageUrl : PackageUrl|null
- Package-URL (PURL).
- $properties : PropertyRepository
- Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions.
- $type : ComponentType
- Specifies the type of component. For software components, classify as application if no more specific appropriate classification is available or cannot be determined for the component.
- $version : string|null
- The component version. The version should ideally comply with semantic versioning but is not enforced.
Methods
- __clone() : mixed
- __construct() : mixed
- getAuthor() : string|null
- getBomRef() : BomRef
- getCopyright() : string|null
- getDependencies() : BomRefRepository
- getDescription() : string|null
- getEvidence() : ComponentEvidence|null
- getExternalReferences() : ExternalReferenceRepository
- getGroup() : non-empty-string|null
- getHashes() : HashDictionary
- getLicenses() : LicenseRepository
- getName() : string
- getPackageUrl() : PackageUrl|null
- getProperties() : PropertyRepository
- getType() : ComponentType
- getVersion() : string|null
- setAuthor() : $this
- setBomRefValue() : $this
- shorthand for `->getBomRef()->setValue()`.
- setCopyright() : static
- setDependencies() : $this
- setDescription() : $this
- setEvidence() : $this
- setExternalReferences() : $this
- setGroup() : $this
- setHashes() : $this
- setLicenses() : $this
- setName() : $this
- setPackageUrl() : $this
- setProperties() : $this
- setType() : $this
- setVersion() : $this
Properties
$author
The person(s) or organization(s) that authored the component.
private
string|null
$author
= null
Tags
$bomRef
An optional identifier which can be used to reference the component elsewhere in the BOM. Every bom-ref should be unique.
private
BomRef
$bomRef
Implementation is intended to prevent memory leaks. See BomDependencyDataModel docs
Tags
$copyright
A copyright notice informing users of the underlying claims to copyright ownership in a published work.
private
string|null
$copyright
= null
$dependencies
References to dependencies.
private
BomRefRepository
$dependencies
Implementation is intended to prevent memory leaks. See BomDependencyDataModel docs
$description
Specifies a description for the component.
private
string|null
$description
= null
Tags
$evidence
Provides the ability to document evidence collected through various forms of extraction or analysis.
private
ComponentEvidence|null
$evidence
= null
$externalReferences
Provides the ability to document external references related to the component or to the project the component describes.
private
ExternalReferenceRepository
$externalReferences
$group
The grouping name or identifier. This will often be a shortened, single name of the company or project that produced the component, or the source package or domain name.
private
string|null
$group
= null
Whitespace and special characters should be avoided.
Examples include: apache, org.apache.commons, and apache.org.
Tags
$hashes
Specifies the file hashes of the component.
private
HashDictionary
$hashes
$licenses
licence(s).
private
LicenseRepository
$licenses
$name
The name of the component. This will often be a shortened, single name of the component.
private
string
$name
Examples: commons-lang3 and jquery
$packageUrl
Package-URL (PURL).
private
PackageUrl|null
$packageUrl
= null
The purl, if specified, must be valid and conform to the specification defined at: https://github.com/package-url/purl-spec/blob/master/README.rst#purl.
$properties
Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions.
private
PropertyRepository
$properties
Unlike key-value stores, properties support duplicate names, each potentially having different values.
Property names of interest to the general public are encouraged to be registered in the CycloneDX Property Taxonomy. Formal registration is OPTIONAL.
$type
Specifies the type of component. For software components, classify as application if no more specific appropriate classification is available or cannot be determined for the component.
private
ComponentType
$type
Valid choices are: application, framework, library, operating-system, device, or file.
Refer to the bom:classification documentation for information describing each one.
$version
The component version. The version should ideally comply with semantic versioning but is not enforced.
private
string|null
$version
= null
Methods
__clone()
public
__clone() : mixed
__construct()
public
__construct(ComponentType $type, string $name) : mixed
Parameters
- $type : ComponentType
- $name : string
Tags
getAuthor()
public
getAuthor() : string|null
Return values
string|nullgetBomRef()
public
getBomRef() : BomRef
Return values
BomRefgetCopyright()
public
getCopyright() : string|null
Return values
string|nullgetDependencies()
public
getDependencies() : BomRefRepository
Return values
BomRefRepositorygetDescription()
public
getDescription() : string|null
Return values
string|nullgetEvidence()
public
getEvidence() : ComponentEvidence|null
Return values
ComponentEvidence|nullgetExternalReferences()
public
getExternalReferences() : ExternalReferenceRepository
Return values
ExternalReferenceRepositorygetGroup()
public
getGroup() : non-empty-string|null
Return values
non-empty-string|nullgetHashes()
public
getHashes() : HashDictionary
Return values
HashDictionarygetLicenses()
public
getLicenses() : LicenseRepository
Return values
LicenseRepositorygetName()
public
getName() : string
Return values
stringgetPackageUrl()
public
getPackageUrl() : PackageUrl|null
Return values
PackageUrl|nullgetProperties()
public
getProperties() : PropertyRepository
Return values
PropertyRepositorygetType()
public
getType() : ComponentType
Return values
ComponentTypegetVersion()
public
getVersion() : string|null
Return values
string|nullsetAuthor()
public
setAuthor(string|null $author) : $this
Parameters
- $author : string|null
Return values
$thissetBomRefValue()
shorthand for `->getBomRef()->setValue()`.
public
setBomRefValue(string|null $value) : $this
Parameters
- $value : string|null
Return values
$thissetCopyright()
public
setCopyright(string|null $copyright) : static
Parameters
- $copyright : string|null
Return values
staticsetDependencies()
public
setDependencies(BomRefRepository $dependencies) : $this
Parameters
- $dependencies : BomRefRepository
Return values
$thissetDescription()
public
setDescription(string|null $description) : $this
Parameters
- $description : string|null
Return values
$thissetEvidence()
public
setEvidence(ComponentEvidence|null $evidence) : $this
Parameters
- $evidence : ComponentEvidence|null
Return values
$thissetExternalReferences()
public
setExternalReferences(ExternalReferenceRepository $externalReferences) : $this
Parameters
- $externalReferences : ExternalReferenceRepository
Return values
$thissetGroup()
public
setGroup(string|null $group) : $this
Parameters
- $group : string|null
Return values
$thissetHashes()
public
setHashes(HashDictionary $hashes) : $this
Parameters
- $hashes : HashDictionary
Return values
$thissetLicenses()
public
setLicenses(LicenseRepository $licenses) : $this
Parameters
- $licenses : LicenseRepository
Return values
$thissetName()
public
setName(string $name) : $this
Parameters
- $name : string
Return values
$thissetPackageUrl()
public
setPackageUrl(PackageUrl|null $purl) : $this
Parameters
- $purl : PackageUrl|null
Return values
$thissetProperties()
public
setProperties(PropertyRepository $properties) : $this
Parameters
- $properties : PropertyRepository
Return values
$thissetType()
public
setType(ComponentType $type) : $this
Parameters
- $type : ComponentType
Return values
$thissetVersion()
public
setVersion(string|null $version) : $this
Parameters
- $version : string|null