PHP Class Airship\Engine\Continuum\Channel

Abstracts a lot of the Channel features away from other code
Afficher le fichier Open project: paragonie/airship

Protected Properties

Свойство Type Description
$ext string
$name string
$parent Continuum | Keyggdrasil
$peers Peer[]
$publicKey ParagonIE\Halite\Asymmetric\SignaturePublicKey
$urls string[]

Méthodes publiques

Méthode 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 méthode

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

createSupplier() public méthode

Create a new supplier.
public createSupplier ( array $data ) : Supplier
$data array
Résultat Supplier

getAllSuppliers() public méthode

Get all suppliers for a particular channel
public getAllSuppliers ( ) : array
Résultat array

getAllURLs() public méthode

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
Résultat array

getAppropriatePeerSize() public méthode

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

getName() public méthode

public getName ( ) : string
Résultat string

getPeerList() public méthode

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

getPublicKey() public méthode

public getPublicKey ( ) : SignaturePublicKey
Résultat ParagonIE\Halite\Asymmetric\SignaturePublicKey

getSupplier() public méthode

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

getURL() public méthode

Get a random URL
public getURL ( ) : string
Résultat string

Property Details

$ext protected_oe property

protected string $ext
Résultat string

$name protected_oe property

protected string $name
Résultat string

$parent protected_oe property

protected Continuum|Keyggdrasil $parent
Résultat Continuum | Keyggdrasil

$peers protected_oe property

protected Peer[] $peers
Résultat Peer[]

$publicKey protected_oe property

protected SignaturePublicKey,ParagonIE\Halite\Asymmetric $publicKey
Résultat ParagonIE\Halite\Asymmetric\SignaturePublicKey

$urls protected_oe property

protected string[] $urls
Résultat string[]