CycloneDX Library

Component
in package

Tags
author

nscuro

author

jkowalleck

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
psalm-var

non-empty-string|null

$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
readonly

A copyright notice informing users of the underlying claims to copyright ownership in a published work.

private string|null $copyright = null

$description

Specifies a description for the component.

private string|null $description = null
Tags
psalm-var

non-empty-string|null

$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
psalm-var

non-empty-string|null

$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

getAuthor()

public getAuthor() : string|null
Return values
string|null

getCopyright()

public getCopyright() : string|null
Return values
string|null

getDescription()

public getDescription() : string|null
Return values
string|null

getGroup()

public getGroup() : non-empty-string|null
Return values
non-empty-string|null

getName()

public getName() : string
Return values
string

getPackageUrl()

public getPackageUrl() : PackageUrl|null
Return values
PackageUrl|null

getVersion()

public getVersion() : string|null
Return values
string|null

setAuthor()

public setAuthor(string|null $author) : $this
Parameters
$author : string|null
Return values
$this

setBomRefValue()

shorthand for `->getBomRef()->setValue()`.

public setBomRefValue(string|null $value) : $this
Parameters
$value : string|null
Return values
$this

setCopyright()

public setCopyright(string|null $copyright) : static
Parameters
$copyright : string|null
Return values
static

setDescription()

public setDescription(string|null $description) : $this
Parameters
$description : string|null
Return values
$this

setGroup()

public setGroup(string|null $group) : $this
Parameters
$group : string|null
Return values
$this

setName()

public setName(string $name) : $this
Parameters
$name : string
Return values
$this

setPackageUrl()

public setPackageUrl(PackageUrl|null $purl) : $this
Parameters
$purl : PackageUrl|null
Return values
$this

setVersion()

public setVersion(string|null $version) : $this
Parameters
$version : string|null
Return values
$this

        
On this page

Search results