Flood.php
public function isAllowed($name, $threshold, $window = 3600, $identifier = null)
    {
        return $threshold > $this->count($name, $window, $identifier);
    }
public function isAllowed($name, $threshold, $window = 3600, $identifier = null)
    {
        return $threshold > $this->count($name, $window, $identifier);
    }
public function isAllowed ( $ name , $ threshold , $ window = 3600 , $ identifier = null ) { return $ threshold > $ this -> count ( $ name , $ window , $ identifier ) ; }
Checks whether a user is allowed to proceed with the specified event.

Events can have thresholds saying that each user can only do that event
a certain number of times in a time window. This function verifies that the
current user has not exceeded this threshold.

@param string $name       The unique name of the event.
@param int    $threshold  The maximum number of times each user can do this event per time window.
@param int    $window     Number of seconds in the time window for this event (default is 3600 seconds/1 hour).
@param        $identifier Unique identifier of the current user. Defaults to their IP address.
@return bool
Checks whether a user is allowed to proceed with the specified event .