* @license PHP License * @package WB * @subpackage base */ WBClass::load('WBAjax'); /** * Simple AJAX stub: Counter * * Flush caches * * @version 0.1.0 * @package WB * @subpackage base */ class WBAjax_Counter extends WBAjax { /** * @var WBStatistic_Generic */ private $counter; /** * Second construcotr * * Called by constructer of super class. * @see include/WB/WBAjax#init() */ protected function init() { $this->counter = WBClass::create('WBStatistic_Generic'); } /** * Count * * @return string zero */ protected function count() { $this->counter->setNamespace($this->req->get('namespace', '')); $this->counter->add($this->req->get('path', '')); return 0; } }