PlaceholderResolverInterface

Interface

Resolves placeholders in license templates with metadata values.

Description

This interface defines the contract for replacing template placeholders such as [year], [author], [project] with actual values.

Table of Contents

Methods

resolve()

Resolves placeholders in a license template with the provided metadata.

 : string
Methods

resolve()

Public

Resolves placeholders in a license template with the provided metadata.

public resolve( string  $template, array{year?: int, organization?: string, author?: string, project?: string}  $metadata) : string
Parameters
$template : string

Description

The license template content with placeholders

$metadata : array{year?: int, organization?: string, author?: string, project?: string}

Description

The metadata values to use for replacement

Return values
string

Description

The template with all resolved placeholders