public function afterCreate($event, $post) { if (!$post->id) { return; } $counterRankUtil = new CounterRankUtil(); $counterRankUtil->getCounterRank('posts')->create($post->id); }
public function initialize() { $this->view->disable(); $counterRankUtil = new CounterRankUtil(); $this->jsClientHandler = $counterRankUtil->getJSClientHandler(); }
/** * 生成服务器验证的 hash * * @param string $groupName * @param string $keys * @return string */ public static function generateHash($groupName, $keys = '') { return md5(self::$counterUtil->getToken($groupName) . $groupName . $keys); }