Package
in package
Contains the details of specific packages.
Tags
Table of Contents
Properties
- $authors : array<int, array<string, mixed>>
- $autoload : array<string, array<string, string>>
- $description : string
- $dist : array<string, string>
- $extra : array<string, mixed>
- $homepage : string
- $keywords : array<int, string>
- $license : array<int, string>
- $name : string
- $notificationUrl : string
- $require : array<string, string>
- $requireDev : array<string, string>
- $source : array<string, string>
- $suggest : array<string, string>
- $time : DateTime
- $type : string
- $version : string
Methods
- factory() : Package
- Creates a new instance with information form an array
- getAuthors() : array<int, array<string, mixed>>
- getAutoload() : array<string, array<string, string>>
- getDescription() : string
- getDist() : array<string, string>
- getExtra() : array<string, mixed>
- getHomepage() : string
- getKeywords() : array<int, string>
- getLicense() : array<int, string>
- getName() : string
- getNamespace() : string
- getNotificationUrl() : string
- getRequire() : array<string, string>
- getRequireDev() : array<string, string>
- getSource() : array<string, string>
- getSuggest() : array<string, string>
- getTime() : DateTime
- getType() : string
- getVersion() : string
- __construct() : $this
- Creates the instance and fills out passed information, or sets defaults.
Properties
$authors
private
array<int, array<string, mixed>>
$authors
List of authors and their information.
$autoload
private
array<string, array<string, string>>
$autoload
The autoload paths for composer to use.
$description
private
string
$description
Short description of this package.
$dist
private
array<string, string>
$dist
The distribution information.
$extra
private
array<string, mixed>
$extra
List of extra info for this package.
$homepage
private
string
$homepage
The url to the homepage for this package.
$keywords
private
array<int, string>
$keywords
List of keywords to help categorize this package.
$license
private
array<int, string>
$license
The list of liceses this package uses.
$name
private
string
$name
The name of the package that packagist uses.
$notificationUrl
private
string
$notificationUrl
The notofication URL, usually points to packagist.
$require
private
array<string, string>
$require
List of required packages for this one, and the version constraint.
$requireDev
private
array<string, string>
$requireDev
List of required development packages for this one, and the version constraint.
$source
private
array<string, string>
$source
The source information.
$suggest
private
array<string, string>
$suggest
List of suggested packages.
$time
private
DateTime
$time
Release date of this version.
$type
private
string
$type
The type of package, usually library, but can be others.
$version
private
string
$version
The version that is installed according to the lock file.
Methods
factory()
Creates a new instance with information form an array
public
static factory(array<string, mixed> $packageInfo) : Package
Parameters
- $packageInfo : array<string, mixed>
-
The known package information used to create a new object.
Return values
PackagegetAuthors()
public
getAuthors() : array<int, array<string, mixed>>
Return values
array<int, array<string, mixed>> —List of authors and their information.
getAutoload()
public
getAutoload() : array<string, array<string, string>>
Return values
array<string, array<string, string>> —The autoload paths for composer to use.
getDescription()
public
getDescription() : string
Return values
string —Short description of this package.
getDist()
public
getDist() : array<string, string>
Return values
array<string, string> —The distribution information.
getExtra()
public
getExtra() : array<string, mixed>
Return values
array<string, mixed> —List of extra info for this package.
getHomepage()
public
getHomepage() : string
Return values
string —The url to the homepage for this package.
getKeywords()
public
getKeywords() : array<int, string>
Return values
array<int, string> —List of keywords to help categorize this package.
getLicense()
public
getLicense() : array<int, string>
Return values
array<int, string> —The list of liceses this package uses.
getName()
public
getName() : string
Return values
string —The name of the package that packagist uses.
getNamespace()
public
getNamespace() : string
Return values
string —The PHP namespace for this package
getNotificationUrl()
public
getNotificationUrl() : string
Return values
string —The notofication URL, usually points to packagist.
getRequire()
public
getRequire() : array<string, string>
Return values
array<string, string> —List of required packages for this one, and the version constraint.
getRequireDev()
public
getRequireDev() : array<string, string>
Return values
array<string, string> —List of required development packages for this one, and the version constraint.
getSource()
public
getSource() : array<string, string>
Return values
array<string, string> —The source information.
getSuggest()
public
getSuggest() : array<string, string>
Return values
array<string, string> —List of suggested packages, or null if none.
getTime()
public
getTime() : DateTime
Return values
DateTime —Release date of this version.
getType()
public
getType() : string
Return values
string —The type of package, usually library, but can be others.
getVersion()
public
getVersion() : string
Return values
string —The version that is installed according to the lock file.
__construct()
Creates the instance and fills out passed information, or sets defaults.
private
__construct(string $name, string $version, array<string, string> $source, array<string, string> $dist, array<string, string> $require, array<string, string> $requireDev, array<string, string> $suggest, string $type, array<string, mixed> $extra, array<string, array<string, string>> $autoload, string $notificationUrl, array<int, string> $license, array<int, array<string, mixed>> $authors, string $description, string $homepage, array<int, string> $keywords, DateTime $time) : $this
Parameters
- $name : string
-
The name of the package that packagist uses.
- $version : string
-
The version that is installed according to the lock file.
- $source : array<string, string>
-
The source information.
- $dist : array<string, string>
-
The distribution information.
- $require : array<string, string>
-
List of required packages for this one, and the version constraint.
- $requireDev : array<string, string>
-
List of required development packages for this one, and the version constraint.
- $suggest : array<string, string>
-
List of suggested packages.
- $type : string
-
The type of package, usually library, but can be others.
- $extra : array<string, mixed>
-
List of extra info for this package.
- $autoload : array<string, array<string, string>>
-
The autoload paths for composer to use.
- $notificationUrl : string
-
The notofication URL, usually points to packagist.
- $license : array<int, string>
-
The list of liceses this package uses.
- $authors : array<int, array<string, mixed>>
-
List of authors and their information.
- $description : string
-
Short description of this package.
- $homepage : string
-
The url to the homepage for this package.
- $keywords : array<int, string>
-
List of keywords to help categorize this package.
- $time : DateTime
-
Release date of this version.