FundingProfile

Class
Read only: Yes Final: Yes

Carries normalized funding metadata across Composer and GitHub formats.

Table of Contents

Properties

 : array<string|int, mixed>
 : array<string|int, mixed>
 : array<string|int, mixed>
 : array<string|int, mixed>

Methods

__construct()

Creates a new funding profile.

 : mixed
getCustomUrls()

Returns the normalized custom funding URLs.

 : array<int, string>
getGithubSponsors()

Returns the normalized GitHub Sponsors handles.

 : array<int, string>
getUnsupportedComposerEntries()

Returns the unsupported Composer funding entries that MUST be preserved.

 : array<int, array<string, mixed>>
getUnsupportedYamlEntries()

Returns the unsupported YAML entries that MUST be preserved.

 : array<string, mixed>
hasYamlContent()

Reports whether the profile contains any YAML-serializable content.

 : bool
Properties

$customUrls

Private
private array<string|int, mixed> $customUrls = []

$githubSponsors

Private
private array<string|int, mixed> $githubSponsors = []

$unsupportedComposerEntries

Private
private array<string|int, mixed> $unsupportedComposerEntries = []

$unsupportedYamlEntries

Private
private array<string|int, mixed> $unsupportedYamlEntries = []
Methods

__construct()

Public

Creates a new funding profile.

public __construct([ array<int, string>  $githubSponsors = []][, array<int, string>  $customUrls = []][, array<string, mixed>  $unsupportedYamlEntries = []][, array<int, array<string, mixed>>  $unsupportedComposerEntries = []]) : mixed
Parameters
$githubSponsors : array<int, string> = []

Description

the normalized GitHub Sponsors handles

$customUrls : array<int, string> = []

Description

the normalized custom funding URLs

$unsupportedYamlEntries : array<string, mixed> = []

Description

the YAML entries preserved without synchronization

$unsupportedComposerEntries : array<int, array<string, mixed>> = []

Description

the Composer entries preserved without synchronization

getCustomUrls()

Public

Returns the normalized custom funding URLs.

public getCustomUrls() : array<int, string>
Return values
array<int, string>

Description

the custom funding URLs

getGithubSponsors()

Public

Returns the normalized GitHub Sponsors handles.

public getGithubSponsors() : array<int, string>
Return values
array<int, string>

Description

the GitHub Sponsors handles

getUnsupportedComposerEntries()

Public

Returns the unsupported Composer funding entries that MUST be preserved.

public getUnsupportedComposerEntries() : array<int, array<string, mixed>>
Return values
array<int, array<string, mixed>>

Description

the Composer funding entries kept without transformation

getUnsupportedYamlEntries()

Public

Returns the unsupported YAML entries that MUST be preserved.

public getUnsupportedYamlEntries() : array<string, mixed>
Return values
array<string, mixed>

Description

the YAML entries kept without transformation

hasYamlContent()

Public

Reports whether the profile contains any YAML-serializable content.

public hasYamlContent() : bool
Return values
bool

Description

true when the YAML file SHOULD exist