FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Check.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Rsi\Fred\Security;
4 
5 abstract class Check extends \Rsi\Fred\Component{
6 
7  public $delay = null; //!< Time (seconds) a ban stays in the registry (empty = use default).
8 
9  /**
10  * Perform the check.
11  * @param bool $expected True if this is an expected call.
12  * @return bool True if everything is fine. False if something is wrong. Null if something is wrong, but it is not
13  * significant enough to add a ban for it (e.g. repeated error).
14  */
15  abstract public function check($expected = false);
16 
17  public function clientConfig(){
18  return [];
19  }
20  /**
21  * Unban a client's IP address.
22  * @param string $addr
23  * @return bool True if he ban was successful deleted.
24  */
25  public function unBan($addr){
26  return true;
27  }
28 
29 }
check($expected=false)
Perform the check.
unBan($addr)
Unban a client&#39;s IP address.
Definition: Check.php:25
$delay
Time (seconds) a ban stays in the registry (empty = use default).
Definition: Check.php:7