ReaderInterface
Reads and exposes metadata from composer.json for license generation.
Description
This interface provides access to license information, package name, authors, vendor, and year data extracted from a project's composer.json.
Methods
Retrieves the list of authors from composer.json.
Retrieves the license identifier from composer.json.
Retrieves the package name from composer.json.
Extracts the vendor name from the package name.
Returns the current year for copyright notices.
Retrieves the list of authors from composer.json.
public
getAuthors() : array<int, array{name: string, email: string, homepage: string, role: string}>
Return values
Retrieves the license identifier from composer.json.
public
getLicense() : string|null
Return values
Description
the license string, or null if not set or unsupported
Retrieves the package name from composer.json.
public
getPackageName() : string
Return values
Description
the full package name (vendor/package)
Extracts the vendor name from the package name.
public
getVendor() : string|null
Return values
Description
the vendor name, or null if package has no vendor prefix
Returns the current year for copyright notices.
public
getYear() : int
Return values
Description
the current year as an integer