Skip to content

Commit

Permalink
Update kabanos.php
Browse files Browse the repository at this point in the history
  • Loading branch information
flenczewski committed Jun 10, 2014
1 parent 7670ec0 commit 4f946bd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions kabanos.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,21 @@ private static function _getUserFingerprint()
/**
* verification and inc counter
*
* @param string $user - id, name or something else eg, hash
* @param string $type - label of object type limit (eg. "add-post", "get-userInfo" etc)
* @param array $config - eg. array(60 => 5, 300 => 10) // seconds => limitCount
* @param string $user - id, name or something else eg, hash
*
* @return true
*/
public static function check($user = null, $type = null, $config = null)
public static function check($type, $config = null, $user = null)
{
if( !$user ) {
$user = self::_getUserFingerprint();
}

$keyPattern = self::KEY_PREFIX .':'. $type .':'. $user; // .':'. $second;


return true;
}

Expand Down

0 comments on commit 4f946bd

Please sign in to comment.