IdentifierSchemeService
in package
IdentifierSchemeService
Implements AtoM-compatible identifier masks:
- strftime tokens (e.g. %Y-%m-%d)
- incremental placeholder: #i
Supports sector overrides stored as settings named:
sector_
Table of Contents
Constants
- PLACEHOLDER_INCREMENT = '#i'
- TYPE_ACCESSION = 'accession'
- TYPE_IDENTIFIER = 'identifier'
Methods
- generateAndIncrement() : string|null
- Generate identifier/accession value and increment the relevant counter.
- getEffectiveValue() : string|null
- Get effective value: sector override if present, else global.
- settingName() : string
- Builds the setting name for a sector override.
Constants
PLACEHOLDER_INCREMENT
public
mixed
PLACEHOLDER_INCREMENT
= '#i'
TYPE_ACCESSION
public
mixed
TYPE_ACCESSION
= 'accession'
TYPE_IDENTIFIER
public
mixed
TYPE_IDENTIFIER
= 'identifier'
Methods
generateAndIncrement()
Generate identifier/accession value and increment the relevant counter.
public
static generateAndIncrement(string $type[, string|null $sector = null ][, string $culture = 'en' ]) : string|null
Returns null if mask is disabled (effective).
Parameters
- $type : string
- $sector : string|null = null
- $culture : string = 'en'
Return values
string|nullgetEffectiveValue()
Get effective value: sector override if present, else global.
public
static getEffectiveValue(string $key[, string|null $sector = null ][, string $culture = 'en' ]) : string|null
Parameters
- $key : string
- $sector : string|null = null
- $culture : string = 'en'
Return values
string|nullsettingName()
Builds the setting name for a sector override.
public
static settingName(string $key[, string|null $sector = null ]) : string
Parameters
- $key : string
- $sector : string|null = null