PHP Класс Resque\Helpers\Stats

Автор: Michael Haynes ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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)

Описание методов

clear() публичный статический Метод

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
Результат boolean True if successful, false if not.

decr() публичный статический Метод

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
Результат boolean True if successful, false if not.

get() публичный статический Метод

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
Результат mixed Value of the statistic.

incr() публичный статический Метод

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
Результат boolean True if successful, false if not.