$name
$name : string
Event name
Defines a type of event to keep track of, the maximum times the event is allowed to occur in an interval and the actions to take when the threshold is exceeded.
$interval : \Spork\DateTime\DateInterval
The interval to measure limit over
__construct(string $name, integer $limit = null, \Spork\DateTime\DateInterval|string $interval = null, array $actions = null)
Initialize instance
string | $name | |
integer | $limit | |
\Spork\DateTime\DateInterval|string | $interval | |
array | $actions |
setLimit(integer $limit) : \Spork\Mvc\Listener\Limit\Limit
Set the maximum count for this limit
integer | $limit |
getInterval() : \Spork\DateTime\DateInterval
Get the limit interval
setInterval(string|\Spork\DateTime\DateInterval $interval) : \Spork\Mvc\Listener\Limit\Limit
Set the limit interval
string|\Spork\DateTime\DateInterval | $interval |
addAction(\Spork\Mvc\Listener\Limit\Action\ActionInterface $action) : \Spork\Mvc\Listener\Limit\Limit
Add an action
\Spork\Mvc\Listener\Limit\Action\ActionInterface | $action |