ResolverInterface

Interface

Resolves license identifiers to their corresponding template filenames.

Description

This interface checks whether a given license is supported and maps it to the appropriate license template file for content generation.

Table of Contents

Methods

isSupported()

Checks whether the given license identifier is supported.

 : bool
resolve()

Resolves a license identifier to its template filename.

 : string|null
Methods

isSupported()

Public

Checks whether the given license identifier is supported.

public isSupported( string  $license) : bool
Parameters
$license : string

Description

The license identifier to check (e.g., "MIT", "Apache-2.0")

Return values
bool

Description

True if the license is supported, false otherwise

resolve()

Public

Resolves a license identifier to its template filename.

public resolve( string  $license) : string|null
Parameters
$license : string

Description

The license identifier to resolve

Return values
string|null

Description

The template filename if supported, or null if not