Support

Class
implements SupportInterface
Read only: Yes Final: Yes

Represents the optional "support" section of a composer.json file.

Description

This value object provides structured access to support-related metadata such as support email, issue tracker, forum, wiki, IRC, source code, documentation, RSS feed, chat channel, and security disclosure policy.

All properties of this class are immutable after instantiation. Consumers MAY safely treat instances of this class as readonly value objects. Since the "support" section is optional in composer.json, each field MAY contain an empty string when the corresponding value is not defined.

Implementations SHALL preserve the exact values provided at construction time. URL-based properties SHOULD contain fully qualified URLs whenever available. The IRC property SHOULD follow the format "irc://server/channel" when provided.

Table of Contents

Interfaces

SupportInterface

Defines the contract for representing the "support" section of a composer.json file.

Properties

 : string
 : string
 : string
 : string
 : string
 : string
 : string
 : string
 : string
 : string

Methods

__construct()

Constructs a new ComposerJsonSupport instance.

 : mixed
getChat()

Retrieves the chat channel URL.

 : string
getDocs()

Retrieves the documentation URL.

 : string
getEmail()

Retrieves the support email address.

 : string
getForum()

Retrieves the forum URL.

 : string
getIrc()

Retrieves the IRC support channel.

 : string
getIssues()

Retrieves the issue tracker URL.

 : string
getRss()

Retrieves the RSS feed URL.

 : string
getSecurity()

Retrieves the vulnerability disclosure policy URL.

 : string
getSource()

Retrieves the source code URL.

 : string
getWiki()

Retrieves the wiki URL.

 : string
Properties

$chat

Private
private string $chat = ''

$docs

Private
private string $docs = ''

$email

Private
private string $email = ''

$forum

Private
private string $forum = ''

$irc

Private
private string $irc = ''

$issues

Private
private string $issues = ''

$rss

Private
private string $rss = ''

$security

Private
private string $security = ''

$source

Private
private string $source = ''

$wiki

Private
private string $wiki = ''
Methods

__construct()

Public

Constructs a new ComposerJsonSupport instance.

public __construct([ string  $email = ''][, string  $issues = ''][, string  $forum = ''][, string  $wiki = ''][, string  $irc = ''][, string  $source = ''][, string  $docs = ''][, string  $rss = ''][, string  $chat = ''][, string  $security = '']) : mixed

Description

Each argument represents an optional support entry from the composer.json "support" section. Callers MAY omit any argument, in which case the value SHALL default to an empty string.

Parameters
$email : string = ''

Description

The support email address. SHOULD be a valid email address.

$issues : string = ''

Description

The URL to the issue tracker. SHOULD be a fully qualified URL.

$forum : string = ''

Description

The URL to the support forum. SHOULD be a fully qualified URL.

$wiki : string = ''

Description

The URL to the project wiki. SHOULD be a fully qualified URL.

$irc : string = ''

Description

The IRC support channel. SHOULD follow the format "irc://server/channel".

$source : string = ''

Description

The URL to browse or download the project source code. SHOULD be a fully qualified URL.

$docs : string = ''

Description

The URL to the project documentation. SHOULD be a fully qualified URL.

$rss : string = ''

Description

The URL to the RSS feed. SHOULD be a fully qualified URL.

$chat : string = ''

Description

The URL to the chat channel. SHOULD be a fully qualified URL.

$security : string = ''

Description

The URL to the vulnerability disclosure policy. SHOULD be a fully qualified URL.

getChat()

Public

Retrieves the chat channel URL.

public getChat() : string

Description

This method MUST return the chat channel URL value exactly as stored by the instance.

Return values
string

Description

the chat channel URL

getDocs()

Public

Retrieves the documentation URL.

public getDocs() : string

Description

This method MUST return the documentation URL value exactly as stored by the instance.

Return values
string

Description

the documentation URL

getEmail()

Public

Retrieves the support email address.

public getEmail() : string

Description

This method MUST return the support email value exactly as stored by the instance.

Return values
string

Description

the support email address

getForum()

Public

Retrieves the forum URL.

public getForum() : string

Description

This method MUST return the forum value exactly as stored by the instance.

Return values
string

Description

the forum URL

getIrc()

Public

Retrieves the IRC support channel.

public getIrc() : string

Description

This method MUST return the IRC value exactly as stored by the instance.

Return values
string

Description

the IRC support channel

getIssues()

Public

Retrieves the issue tracker URL.

public getIssues() : string

Description

This method MUST return the issue tracker value exactly as stored by the instance.

Return values
string

Description

the issue tracker URL

getRss()

Public

Retrieves the RSS feed URL.

public getRss() : string

Description

This method MUST return the RSS feed URL value exactly as stored by the instance.

Return values
string

Description

the RSS feed URL

getSecurity()

Public

Retrieves the vulnerability disclosure policy URL.

public getSecurity() : string

Description

This method MUST return the security policy URL value exactly as stored by the instance.

Return values
string

Description

the vulnerability disclosure policy URL

getSource()

Public

Retrieves the source code URL.

public getSource() : string

Description

This method MUST return the source URL value exactly as stored by the instance.

Return values
string

Description

the source code URL

getWiki()

Public

Retrieves the wiki URL.

public getWiki() : string

Description

This method MUST return the wiki value exactly as stored by the instance.

Return values
string

Description

the wiki URL