Navigation | Overlay |
---|---|
t Navigate files | h Toggle hits |
y Change url to tip of branch | m Toggle misses |
b / v Jump to prev/next hit line | p Toggle partial |
z / x Jump to prev/next missed or partial line | 1..9 Toggle flags |
shift + o Open current page in GitHub | a Toggle all on |
/ or ? Show keyboard shortcuts dialog | c Toggle context lines or commits |
1 |
<?php
|
|
2 |
/**
|
|
3 |
* This file is part of the Shieldon package.
|
|
4 |
*
|
|
5 |
* (c) Terry L. <contact@terryl.in>
|
|
6 |
*
|
|
7 |
* For the full copyright and license information, please view the LICENSE
|
|
8 |
* file that was distributed with this source code.
|
|
9 |
*
|
|
10 |
* php version 7.1.0
|
|
11 |
*
|
|
12 |
* @category Web-security
|
|
13 |
* @package Shieldon
|
|
14 |
* @author Terry Lin <contact@terryl.in>
|
|
15 |
* @copyright 2019 terrylinooo
|
|
16 |
* @license https://github.com/terrylinooo/shieldon/blob/2.x/LICENSE MIT
|
|
17 |
* @link https://github.com/terrylinooo/shieldon
|
|
18 |
* @see https://shieldon.io
|
|
19 |
*/
|
|
20 |
|
|
21 |
declare(strict_types=1); |
|
22 |
|
|
23 |
namespace Shieldon\Firewall\Component; |
|
24 |
|
|
25 |
/**
|
|
26 |
* ComponentPrivider
|
|
27 |
*/
|
|
28 |
abstract class ComponentProvider |
|
29 |
{
|
|
30 |
/**
|
|
31 |
* It is really strict.
|
|
32 |
*
|
|
33 |
* @var bool
|
|
34 |
*/
|
|
35 |
protected $strictMode = false; |
|
36 |
|
|
37 |
/**
|
|
38 |
* Enable strict mode.
|
|
39 |
*
|
|
40 |
* @param bool $bool Set true to enble strict mode, false to disable it overwise.
|
|
41 |
*
|
|
42 |
* @return void
|
|
43 |
*/
|
|
44 | 3 |
public function setStrict(bool $bool): void |
45 |
{
|
|
46 | 3 |
$this->strictMode = $bool; |
47 |
}
|
|
48 |
|
|
49 |
/**
|
|
50 |
* Unique deny status code.
|
|
51 |
*
|
|
52 |
* @return int
|
|
53 |
*/
|
|
54 |
abstract public function getDenyStatusCode(): int; |
|
55 |
}
|
Read our documentation on viewing source code .