Beanstalk\Stats Class Ref

class Beanstalk\Stats

Class Methods

Beanstalk\Stats::__construct([$data = null])
Description:

Constructor

Parameters:
  • $data (string) – Set stats from input data in the form “stat-1: valuenstat-2: value”
Beanstalk\Stats::getStat($stat)
Description:

Get the value of a given stat

Parameters:
  • $stat (string) – Stat name to get the value of
Returns:

string Stat’s value

Returns:

boolean false when value not set

Beanstalk\Stats::getStats()
Description:Get all the stats as an array
Returns:array ( ‘stat1-name’ => ‘value’ , ‘stat2-name’ => ‘value’ , ... )
Beanstalk\Stats::setStat($stat, $value)
Description:

Set a stat to a given value

Parameters:
  • $stat (string) –
  • $value (string) –
Returns:

null