-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3fa2c70
commit 67a1f9c
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* Kabanos | ||
* | ||
* Funkcjonalność | ||
* ~~~~~~~~~~~~~~ | ||
* | ||
* a. zliczanie ilości requestów w funckji czasu (1h, 24h) | ||
* b. automatycznie blokowanie (na określony czas) po przekroczeniu granicznych wartośći | ||
* c. próba identyfikacji użytkownika (anonimowego) | ||
* | ||
* Konfiguracja | ||
* ~~~~~~~~~~~~ | ||
* | ||
* $type = array('limit' => array(10 => 5, 60 => 10, 3600 => 20) ); | ||
* $type - typ obiektu | ||
* limit | ||
* 10 sek - 5 req | ||
* 60 sek - 10 req | ||
* 3600 sek - 20 req | ||
* | ||
* | ||
* @author Fabian Lenczewski <fabian.lenczewski@gmail.com> | ||
* @since 2014-06-10 | ||
*/ | ||
class Kabanos | ||
{ | ||
const KEY_PREFIX = 'banos'; | ||
|
||
// pobranie konfiguracji bazy danych | ||
private static function _getDb() | ||
{ | ||
} | ||
|
||
// próba identyfikacji użytkownika | ||
private static function _getFingerprint() | ||
{ | ||
} | ||
|
||
// pobranie limitów | ||
// public static function getConfig() | ||
// { | ||
// } | ||
|
||
|
||
// weryfikacja + większenie licznika | ||
public static function check($user = null, $type = null, $config = null) | ||
{ | ||
} | ||
|
||
|
||
} |