PHP Class Airship\Engine\Continuum\Channel

Abstracts a lot of the Channel features away from other code
Datei anzeigen Open project: paragonie/airship

Protected Properties

Property Type Description
$ext string
$name string
$parent Continuum | Keyggdrasil
$peers Peer[]
$publicKey ParagonIE\Halite\Asymmetric\SignaturePublicKey
$urls string[]

Public Methods

Method Description
__construct ( object $parent, string $name, array $config = [] ) Channel constructor.
createSupplier ( array $data ) : Supplier Create a new supplier.
getAllSuppliers ( ) : array Get all suppliers for a particular channel
getAllURLs ( boolean $doNotShuffle = false ) : array Get all URLs
getAppropriatePeerSize ( integer $sizeOfList ) : integer The natural log of the size of the peer list, rounded up.
getName ( ) : string
getPeerList ( boolean $forceFlush = false ) : array Get a list of peers for a given channel
getPublicKey ( ) : SignaturePublicKey
getSupplier ( string $name, boolean $flush = false ) : Supplier Get a supplier
getURL ( ) : string Get a random URL

Method Details

__construct() public method

Channel constructor.
public __construct ( object $parent, string $name, array $config = [] )
$parent object (Continuum or Keyggdrasil)
$name string
$config array

createSupplier() public method

Create a new supplier.
public createSupplier ( array $data ) : Supplier
$data array
return Supplier

getAllSuppliers() public method

Get all suppliers for a particular channel
public getAllSuppliers ( ) : array
return array

getAllURLs() public method

By default, this shuffles them randomly. If you're in tor-only mode, it prioritizes .onion domains first.
public getAllURLs ( boolean $doNotShuffle = false ) : array
$doNotShuffle boolean
return array

getAppropriatePeerSize() public method

The natural log of the size of the peer list, rounded up.
public getAppropriatePeerSize ( integer $sizeOfList ) : integer
$sizeOfList integer
return integer

getName() public method

public getName ( ) : string
return string

getPeerList() public method

Get a list of peers for a given channel
public getPeerList ( boolean $forceFlush = false ) : array
$forceFlush boolean
return array

getPublicKey() public method

public getPublicKey ( ) : SignaturePublicKey
return ParagonIE\Halite\Asymmetric\SignaturePublicKey

getSupplier() public method

Get a supplier
public getSupplier ( string $name, boolean $flush = false ) : Supplier
$name string
$flush boolean
return Supplier

getURL() public method

Get a random URL
public getURL ( ) : string
return string

Property Details

$ext protected_oe property

protected string $ext
return string

$name protected_oe property

protected string $name
return string

$parent protected_oe property

protected Continuum|Keyggdrasil $parent
return Continuum | Keyggdrasil

$peers protected_oe property

protected Peer[] $peers
return Peer[]

$publicKey protected_oe property

protected SignaturePublicKey,ParagonIE\Halite\Asymmetric $publicKey
return ParagonIE\Halite\Asymmetric\SignaturePublicKey

$urls protected_oe property

protected string[] $urls
return string[]