This repository was archived by the owner on Apr 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathhelpers.php
98 lines (89 loc) · 2.09 KB
/
helpers.php
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
/**
* src/helpers.php.
*
* @author Austin Heap <me@austinheap.com>
* @version v0.2.1
*/
declare(strict_types=1);
if (! function_exists('database_encryption')) {
/**
* @return \AustinHeap\Database\Encryption\EncryptionHelper
*/
function database_encryption(): \AustinHeap\Database\Encryption\EncryptionHelper
{
return \AustinHeap\Database\Encryption\EncryptionFacade::getInstance();
}
}
if (! function_exists('db_encryption')) {
/**
* @return \AustinHeap\Database\Encryption\EncryptionHelper
*/
function db_encryption(): \AustinHeap\Database\Encryption\EncryptionHelper
{
return database_encryption();
}
}
if (! function_exists('dbencryption')) {
/**
* @return \AustinHeap\Database\Encryption\EncryptionHelper
*/
function dbencryption(): \AustinHeap\Database\Encryption\EncryptionHelper
{
return database_encryption();
}
}
if (! function_exists('database_encrypt')) {
/**
* @return null|string
*/
function database_encrypt(?string $value = null): ?string
{
return __FUNCTION__.': FUNCTION-NOT-IMPLEMENTED';
}
}
if (! function_exists('db_encrypt')) {
/**
* @return null|string
*/
function db_encrypt(?string $value = null): ?string
{
return database_encrypt($value);
}
}
if (! function_exists('dbencrypt')) {
/**
* @return null|string
*/
function dbencrypt(?string $value = null): ?string
{
return database_encrypt($value);
}
}
if (! function_exists('database_decrypt')) {
/**
* @return null|string
*/
function database_decrypt(string $value): ?string
{
return __FUNCTION__.': FUNCTION-NOT-IMPLEMENTED';
}
}
if (! function_exists('db_decrypt')) {
/**
* @return null|string
*/
function db_decrypt(string $value): ?string
{
return database_decrypt($value);
}
}
if (! function_exists('dbdecrypt')) {
/**
* @return null|string
*/
function dbdecrypt(string $value): ?string
{
return database_decrypt($value);
}
}