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.
Interfaces
Defines the contract for representing the "support" section of a composer.json file.
Properties
Methods
Constructs a new ComposerJsonSupport instance.
Retrieves the chat channel URL.
Retrieves the documentation URL.
Retrieves the support email address.
Retrieves the forum URL.
Retrieves the IRC support channel.
Retrieves the issue tracker URL.
Retrieves the RSS feed URL.
Retrieves the vulnerability disclosure policy URL.
Retrieves the source code URL.
Retrieves the wiki URL.
private
string
$chat
=
''
private
string
$docs
=
''
private
string
$email
=
''
private
string
$forum
=
''
private
string
$irc
=
''
private
string
$issues
=
''
private
string
$rss
=
''
private
string
$security
=
''
private
string
$source
=
''
private
string
$wiki
=
''
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.
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
Description
the chat channel URL
Retrieves the documentation URL.
public
getDocs() : string
Description
This method MUST return the documentation URL value exactly as stored by the instance.
Return values
Description
the documentation URL
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
Description
the support email address
Retrieves the forum URL.
public
getForum() : string
Description
This method MUST return the forum value exactly as stored by the instance.
Return values
Description
the forum URL
Retrieves the IRC support channel.
public
getIrc() : string
Description
This method MUST return the IRC value exactly as stored by the instance.
Return values
Description
the IRC support channel
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
Description
the issue tracker URL
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
Description
the RSS feed URL
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
Description
the vulnerability disclosure policy URL
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
Description
the source code URL
Retrieves the wiki URL.
public
getWiki() : string
Description
This method MUST return the wiki value exactly as stored by the instance.
Return values
Description
the wiki URL