-
-
Notifications
You must be signed in to change notification settings - Fork 0
Funding
Represents a single funding entry from the optional "funding" section of a composer.json file.
A funding entry identifies a funding platform or mechanism and the URL through which users MAY financially support package maintenance and future development.
This class is an immutable value object. All promoted properties are assigned at construction time and MUST NOT be modified afterward.
The type property SHOULD contain a meaningful funding platform identifier such as "patreon", "opencollective", "tidelift", "github", or "other".
The url property MUST contain the funding destination URL and SHOULD be a fully qualified URL.
- Full name:
\FastForward\DevTools\Composer\Json\Schema\Funding - This class is marked as final and can't be subclassed
- This class implements:
\FastForward\DevTools\Composer\Json\Schema\FundingInterface - This class is a Final class
Constructs a new funding entry.
public __construct(string $type, string $url): mixedThe provided values SHALL be stored exactly as received.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$type |
string | the funding platform or mechanism identifier |
$url |
string | the URL that provides funding details and support options |
Retrieves the funding type.
public getType(): stringThis method MUST return the funding platform or mechanism identifier associated with this entry.
Return Value:
the funding type identifier
Retrieves the funding URL.
public getUrl(): stringThis method MUST return the URL that provides funding details and a way to financially support the package.
Return Value:
the funding URL