-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShield.php
More file actions
51 lines (42 loc) · 1.2 KB
/
Shield.php
File metadata and controls
51 lines (42 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
declare(strict_types=1);
/**
* Anchor Framework
*
* Shield static facade/main class.
*
* @author BenIyke <beniyke34@gmail.com> | Twitter: @BigBeniyke
*/
namespace Shield;
use Shield\Drivers\CaptchaDriverInterface;
use Shield\Services\ShieldAnalytics;
use Shield\Services\ShieldManagerService;
/**
* Shield Static Facade.
*/
class Shield
{
/**
* Verify the token using the default driver.
*/
public static function verify(string $token, ?string $ip = null): bool
{
return resolve(ShieldManagerService::class)->verify($token, $ip);
}
public static function render(?string $driver = null, array $attributes = []): string
{
return resolve(ShieldManagerService::class)->render($driver, $attributes);
}
public static function getScript(?string $driver = null): string
{
return resolve(ShieldManagerService::class)->getScript($driver);
}
public static function driver(?string $driver = null): CaptchaDriverInterface
{
return resolve(ShieldManagerService::class)->driver($driver);
}
public static function analytics(): ShieldAnalytics
{
return resolve(ShieldManagerService::class)->analytics();
}
}