PHP Class Elgg\Timer

Afficher le fichier Open project: elgg/elgg

Méthodes publiques

Méthode Description
begin ( array $keys ) : void Record the start time of a period
end ( array $keys ) : void Record the end time of a period
getTimes ( ) : array Get the tree of recorded start/end times
hasEnded ( array $keys ) : boolean Has the end of the period been recorded?

Private Methods

Méthode Description
getTreeNode ( array $keys ) : array Get a reference to the period array for the given keys

Method Details

begin() public méthode

Record the start time of a period
public begin ( array $keys ) : void
$keys array Keys to identify period. E.g. ['startup', __FUNCTION__]
Résultat void

end() public méthode

Record the end time of a period
public end ( array $keys ) : void
$keys array Keys to identify period. E.g. ['startup', __FUNCTION__]
Résultat void

getTimes() public méthode

Get the tree of recorded start/end times
public getTimes ( ) : array
Résultat array

hasEnded() public méthode

Has the end of the period been recorded?
public hasEnded ( array $keys ) : boolean
$keys array Keys to identify period. E.g. ['startup', __FUNCTION__]
Résultat boolean