PHP Class Airship\Cabin\Bridge\Blueprint\Skyport

Manages data about the available/existing Airship extensions
Inheritance: extends BlueprintGear, use trait Common
Show file Open project: paragonie/airship Class Usage Examples

Protected Properties

Property Type Description
$installHash string
$prefix string

Public Methods

Method Description
countAvailable ( string $type = '' ) : integer Get the number of packages available
countInstalled ( ) : integer Get the number of packages installed
countOutdated ( ) : integer
forceRemoval ( string $type, string $supplier, string $package ) : string Force a package to be removed.
getAvailable ( string $type = '', string $query = '', integer $offset, integer $limit ) : array Get the available packages (based on data provided by Keyggdrasil)
getDetails ( string $type, string $supplier, string $name ) : array Get the relevant details for a particular package
getInstalled ( boolean $grouped = false, integer $offset, integer $limit = 20 ) : array Get a list of all installed packages
getLeftMenu ( ) : array Dynamic content for the left menu of the Skyport.
getLogMessages ( DateTime $cutoffDate = null ) : array Get the recent messages in the update log
getOutdatedPackages ( ) : array Gets all packages for which a new version is available.
getURL ( string $type, string $supplier, string $name ) : string
isLocked ( ) : boolean Is the skyport locked? This prevents packages from being installed or removed.
isPasswordLocked ( ) : boolean Is the skyport password-protected? This prevents packages from being installed or removed without a separate password?
manualRefresh ( string $type, string $supplier, string $pkg ) : boolean Manually refresh a package's metadata.
tryUnlockPassword ( HiddenString $password ) : boolean

Protected Methods

Method Description
deleteMotifFromCabin ( string $cabin, string $key ) Deletes a motif from a cabin's configuration
getAvailableUpgrades ( array $ext = [] ) : array Get a list of all the available upgrade version identifiers
getMotifPath ( string $cabin, array $info ) : array Locate the path that hosts the motif
getNewVersions ( array $package ) : array Get all of the new versions available for a given package
getPackageMetadata ( string $type, string $supplier, string $pkg ) : array Get the updated metadata for a particular package.
removeCabin ( array $info ) : string Remove a cabin
removeGadget ( array $info ) : string Remove a gadget
removeMotif ( array $info ) : string Remove a motif

Method Details

countAvailable() public method

Get the number of packages available
public countAvailable ( string $type = '' ) : integer
$type string The package type
return integer

countInstalled() public method

Get the number of packages installed
public countInstalled ( ) : integer
return integer

countOutdated() public method

public countOutdated ( ) : integer
return integer

deleteMotifFromCabin() protected method

Deletes a motif from a cabin's configuration
protected deleteMotifFromCabin ( string $cabin, string $key )
$cabin string
$key string

forceRemoval() public method

Force a package to be removed.
public forceRemoval ( string $type, string $supplier, string $package ) : string
$type string
$supplier string
$package string
return string

getAvailable() public method

Get the available packages (based on data provided by Keyggdrasil)
public getAvailable ( string $type = '', string $query = '', integer $offset, integer $limit ) : array
$type string
$query string Search query
$offset integer
$limit integer
return array

getAvailableUpgrades() protected method

Get a list of all the available upgrade version identifiers
protected getAvailableUpgrades ( array $ext = [] ) : array
$ext array
return array

getDetails() public method

Get the relevant details for a particular package
public getDetails ( string $type, string $supplier, string $name ) : array
$type string
$supplier string
$name string
return array

getInstalled() public method

Get a list of all installed packages
public getInstalled ( boolean $grouped = false, integer $offset, integer $limit = 20 ) : array
$grouped boolean Group by type? (Creates 2D array)
$offset integer
$limit integer
return array

getLeftMenu() public method

Dynamic content for the left menu of the Skyport.
public getLeftMenu ( ) : array
return array

getLogMessages() public method

Get the recent messages in the update log
public getLogMessages ( DateTime $cutoffDate = null ) : array
$cutoffDate DateTime
return array

getMotifPath() protected method

Locate the path that hosts the motif
protected getMotifPath ( string $cabin, array $info ) : array
$cabin string
$info array
return array

getNewVersions() protected method

Unlike getAvailableUpgrades(), this gets the full dataset
protected getNewVersions ( array $package ) : array
$package array
return array

getOutdatedPackages() public method

Gets all packages for which a new version is available.
public getOutdatedPackages ( ) : array
return array

getPackageMetadata() protected method

Get the updated metadata for a particular package.
protected getPackageMetadata ( string $type, string $supplier, string $pkg ) : array
$type string
$supplier string
$pkg string
return array

getURL() public method

public getURL ( string $type, string $supplier, string $name ) : string
$type string
$supplier string
$name string
return string

isLocked() public method

Is the skyport locked? This prevents packages from being installed or removed.
public isLocked ( ) : boolean
return boolean

isPasswordLocked() public method

Is the skyport password-protected? This prevents packages from being installed or removed without a separate password?
public isPasswordLocked ( ) : boolean
return boolean

manualRefresh() public method

Manually refresh a package's metadata.
public manualRefresh ( string $type, string $supplier, string $pkg ) : boolean
$type string
$supplier string
$pkg string
return boolean

removeCabin() protected method

Remove a cabin
protected removeCabin ( array $info ) : string
$info array
return string

removeGadget() protected method

Remove a gadget
protected removeGadget ( array $info ) : string
$info array
return string

removeMotif() protected method

Remove a motif
protected removeMotif ( array $info ) : string
$info array
return string

tryUnlockPassword() public method

public tryUnlockPassword ( HiddenString $password ) : boolean
$password HiddenString
return boolean

Property Details

$installHash protected property

protected string $installHash
return string

$prefix protected property

protected string $prefix
return string