public function reset()
 {
     $this->includeRoute = false;
     $this->walkProgramme = null;
     $this->leader = null;
     $this->startTimeMax = null;
     parent::reset();
 }
예제 #2
0
파일: index.php 프로젝트: phparmory/rate
<?php

require 'vendor/autoload.php';
use Armory\Rate\{ActorFactory, EventFactory, EventRepositoryFactory, RateLimitFactory, RateLimiterFactory};
$actorFactory = new ActorFactory();
$eventFactory = new EventFactory();
$eventRepositoryFactory = new EventRepositoryFactory();
$rateLimitFactory = new RateLimitFactory();
$rateLimiterFactory = new RateLimiterFactory();
$actor = $actorFactory->create('127.0.0.1');
$event = $eventFactory->create('api.request', 1, $actor);
$repository = $eventRepositoryFactory->create();
$rateLimit = $rateLimitFactory->create(1, 5, 0);
$rateLimiter = $rateLimiterFactory->create($event, $rateLimit, $repository);
$rateLimiter->run();
$rateLimiter->run();
예제 #3
0
 public function sendGameMessage($userid, \MessageQueue\Message $message, $action)
 {
     // build a bingo event..
     $event = EventFactory::buildBingoEvent($message);
     return $this->sendEvent($userid, $event, $action);
 }