PHP Class Resque\Helpers\Stats

Author: Michael Haynes ([email protected])
Afficher le fichier Open project: mjphaynes/php-resque Class Usage Examples

Méthodes publiques

Méthode Description
clear ( string $stat, string $key = Stats::DEFAULT_KEY ) : boolean Delete a statistic with the given name.
decr ( string $stat, integer $by = 1, string $key = Stats::DEFAULT_KEY ) : boolean Decrement the value of the specified statistic by a certain amount (default is -1)
get ( string $stat, string $key = Stats::DEFAULT_KEY ) : mixed Get the value of the supplied statistic counter for the specified statistic
incr ( string $stat, integer $by = 1, string $key = Stats::DEFAULT_KEY ) : boolean Increment the value of the specified statistic by a certain amount (default is 1)

Method Details

clear() public static méthode

Delete a statistic with the given name.
public static clear ( string $stat, string $key = Stats::DEFAULT_KEY ) : boolean
$stat string The name of the statistic to delete.
$key string The stat key to use
Résultat boolean True if successful, false if not.

decr() public static méthode

Decrement the value of the specified statistic by a certain amount (default is -1)
public static decr ( string $stat, integer $by = 1, string $key = Stats::DEFAULT_KEY ) : boolean
$stat string The name of the statistic to decrement.
$by integer The amount to decrement the statistic by.
$key string The stat key to use
Résultat boolean True if successful, false if not.

get() public static méthode

Get the value of the supplied statistic counter for the specified statistic
public static get ( string $stat, string $key = Stats::DEFAULT_KEY ) : mixed
$stat string The name of the statistic to get the stats for
$key string The stat key to use
Résultat mixed Value of the statistic.

incr() public static méthode

Increment the value of the specified statistic by a certain amount (default is 1)
public static incr ( string $stat, integer $by = 1, string $key = Stats::DEFAULT_KEY ) : boolean
$stat string The name of the statistic to increment
$by integer The amount to increment the statistic by
$key string The stat key to use
Résultat boolean True if successful, false if not.