PHP Class Aerys\Ticker

Inheritance: implements aerys\ServerObserver, use trait Struct
Afficher le fichier Open project: amphp/aerys

Méthodes publiques

Свойство Type Description
$currentHttpDate
$currentTime

Méthodes publiques

Méthode Description
__construct ( Psr\Log\LoggerInterface $logger )
update ( Server $server ) : Promise
updateTime ( ) : void Updates the context with the current time
use ( callable $useCallback ) : void Add a callback to invoke each time the time context updates

Private Methods

Méthode Description
tryUseCallback ( callable $useCallback )

Method Details

__construct() public méthode

public __construct ( Psr\Log\LoggerInterface $logger )
$logger Psr\Log\LoggerInterface

update() public méthode

public update ( Server $server ) : Promise
$server Server
Résultat Promise

updateTime() public méthode

Updates the context with the current time
public updateTime ( ) : void
Résultat void

use() public méthode

Callbacks are invoked with two parameters: currentTime and currentHttpDate.
public use ( callable $useCallback ) : void
$useCallback callable
Résultat void

Property Details

$currentHttpDate public_oe property

public $currentHttpDate

$currentTime public_oe property

public $currentTime