Bom
in package
Tags
Table of Contents
Properties
- $components : ComponentRepository
- $externalReferences : ExternalReferenceRepository
- Provides the ability to document external references related to the BOM or to the project the BOM describes.
- $metadata : Metadata
- $properties : PropertyRepository
- Provides the ability to document properties in a key/value store.
- $serialNumber : string|null
- Every BOM generated SHOULD have a unique serial number, even if the contents of the BOM have not changed over time.
- $version : int
- The version allows component publishers/authors to make changes to existing BOMs to update various aspects of the document such as description or licenses.
Methods
- __construct() : mixed
- getComponents() : ComponentRepository
- getExternalReferences() : ExternalReferenceRepository
- getMetadata() : Metadata
- getProperties() : PropertyRepository
- getSerialNumber() : string|null
- getVersion() : int
- setComponents() : $this
- setExternalReferences() : $this
- setMetadata() : $this
- setProperties() : $this
- setSerialNumber() : $this
- Create valid values with {@see \CycloneDX\Core\Utils\BomUtility::randomSerialNumber()}.
- setVersion() : $this
- isValidVersion() : bool
Properties
$components
private
ComponentRepository
$components
$externalReferences
Provides the ability to document external references related to the BOM or to the project the BOM describes.
private
ExternalReferenceRepository
$externalReferences
$metadata
private
Metadata
$metadata
$properties
Provides the ability to document properties in a key/value store.
private
PropertyRepository
$properties
This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions.
Property names of interest to the general public are encouraged to be registered in the CycloneDX Property Taxonomy. Formal registration is OPTIONAL.
$serialNumber
Every BOM generated SHOULD have a unique serial number, even if the contents of the BOM have not changed over time.
private
string|null
$serialNumber
= null
If specified, the serial number MUST conform to RFC-4122. Use of serial numbers are RECOMMENDED.
- pattern for XSD: urn:uuid:([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|({[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}})
- pattern for JSON: ^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Tags
$version
The version allows component publishers/authors to make changes to existing BOMs to update various aspects of the document such as description or licenses.
private
int
$version
= 1
When a system is presented with multiple BOMs for the same component, the system should use the most recent version of the BOM. The default version is '1' and should be incremented for each version of the BOM that is published. Each version of a component should have a unique BOM and if no changes are made to the BOMs, then each BOM will have a version of '1'.
Tags
Methods
__construct()
public
__construct() : mixed
getComponents()
public
getComponents() : ComponentRepository
Return values
ComponentRepositorygetExternalReferences()
public
getExternalReferences() : ExternalReferenceRepository
Return values
ExternalReferenceRepositorygetMetadata()
public
getMetadata() : Metadata
Return values
MetadatagetProperties()
public
getProperties() : PropertyRepository
Return values
PropertyRepositorygetSerialNumber()
public
getSerialNumber() : string|null
Tags
Return values
string|nullgetVersion()
public
getVersion() : int
Tags
Return values
intsetComponents()
public
setComponents(ComponentRepository $components) : $this
Parameters
- $components : ComponentRepository
Return values
$thissetExternalReferences()
public
setExternalReferences(ExternalReferenceRepository $externalReferences) : $this
Parameters
- $externalReferences : ExternalReferenceRepository
Return values
$thissetMetadata()
public
setMetadata(Metadata $metadata) : $this
Parameters
- $metadata : Metadata
Return values
$thissetProperties()
public
setProperties(PropertyRepository $properties) : $this
Parameters
- $properties : PropertyRepository
Return values
$thissetSerialNumber()
Create valid values with {@see \CycloneDX\Core\Utils\BomUtility::randomSerialNumber()}.
public
setSerialNumber(string|null $serialNumber) : $this
Parameters
- $serialNumber : string|null
Return values
$thissetVersion()
public
setVersion(int $version) : $this
Parameters
- $version : int
-
a value >= 1
Tags
Return values
$thisisValidVersion()
private
static isValidVersion(int $version) : bool
Parameters
- $version : int