PHP Class PUGX\Badge\Model\Package

Author: Giulio De Donato ([email protected])
Show file Open project: pugx/badge-poser Class Usage Examples

Public Methods

Method Description
createFromApi ( Package $apiPackage ) : Package Create a new Package decorated with the Api Package.
getDescription ( )
getDownloads ( )
getFavers ( )
getLatestStableVersion ( )
getLatestStableVersionNormalized ( ) : null
getLatestUnstableVersion ( )
getLatestUnstableVersionNormalized ( )
getLicense ( )
getMaintainers ( )
getName ( ) original object's property
getOriginalObject ( )
getPackageDownloads ( string $type ) : string Take the Type of the Downloads (total, monthly or daily).
getRepository ( )
getTime ( )
getType ( )
getVersions ( )
hasStableVersion ( )
hasUnstableVersion ( )
parseStability ( string $version ) : string Returns the stability of a version.

Private Methods

Method Description
__construct ( Package $apiPackage )
calculateLatestVersions ( ) : Package Set the latest Stable and the latest Unstable version from a Package.
getBranchAliases ( Packagist\Api\Result\Package\Version $version ) : null | array Get all the branch aliases.
setLatestStableVersion ( $version )
setLatestStableVersionNormalized ( $latestStableVersionNormalized )
setLatestUnstableVersion ( $version )
setLatestUnstableVersionNormalized ( $latestUnstableVersionNormalized )
setLicense ( $license )
setOriginalObject ( Package $originalObject )

Method Details

createFromApi() public static method

Create a new Package decorated with the Api Package.
public static createFromApi ( Package $apiPackage ) : Package
$apiPackage Packagist\Api\Result\Package
return Package

getDescription() public method

public getDescription ( )

getDownloads() public method

public getDownloads ( )

getFavers() public method

public getFavers ( )

getLatestStableVersion() public method

getLatestStableVersionNormalized() public method

getLatestUnstableVersion() public method

getLatestUnstableVersionNormalized() public method

getLicense() public method

public getLicense ( )

getMaintainers() public method

public getMaintainers ( )

getName() public method

original object's property
public getName ( )

getOriginalObject() public method

public getOriginalObject ( )

getPackageDownloads() public method

Take the Type of the Downloads (total, monthly or daily).
public getPackageDownloads ( string $type ) : string
$type string
return string

getRepository() public method

public getRepository ( )

getTime() public method

public getTime ( )

getType() public method

public getType ( )

getVersions() public method

public getVersions ( )

hasStableVersion() public method

public hasStableVersion ( )

hasUnstableVersion() public method

public hasUnstableVersion ( )

parseStability() public static method

This function is part of Composer. (c) Nils Adermann Jordi Boggiano
public static parseStability ( string $version ) : string
$version string
return string