git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4657 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
47 lines
1.3 KiB
PHP
47 lines
1.3 KiB
PHP
<?php
|
|
/** DomFramework
|
|
@package domframework
|
|
@author Dominique Fournier <dominique@fournier38.fr> */
|
|
|
|
/** The rate limit abstract class */
|
|
class ratelimit
|
|
{
|
|
/** The maximum number of entries by specified unit time */
|
|
public $maxEntries = 10;
|
|
/** The unit time in seconds */
|
|
public $unittime = 60;
|
|
|
|
/** The function set a rate-limit
|
|
* @param string $name The rate-limit object to set
|
|
* @return bool true if the rate-limit is not overloaded
|
|
* false if the rate-limit is overloaded
|
|
*/
|
|
public function set ($name)
|
|
{
|
|
throw new \Exception (dgettext("domframework",
|
|
"ratelimit : no valid ratelimiter available"),
|
|
500);
|
|
}
|
|
|
|
/** The function delete a rate-limit
|
|
* @param string $name The rate-limit object to del
|
|
* @return bool
|
|
*/
|
|
public function del ($name)
|
|
{
|
|
throw new \Exception (dgettext("domframework",
|
|
"ratelimit : no valid ratelimiter available"),
|
|
500);
|
|
}
|
|
|
|
/** The function clean the storage
|
|
* @return bool
|
|
*/
|
|
public function clean ()
|
|
{
|
|
throw new \Exception (dgettext("domframework",
|
|
"ratelimit : no valid ratelimiter available"),
|
|
500);
|
|
}
|
|
}
|