Version Description
(2/15/2022) =
- Fram-306 Streamline the code to address malware warning from 3rd party code
- Reduced PHP requirement to 5.6
Download this release
Release Info
Developer | data443 |
Plugin | The GDPR Framework By Data443 |
Version | 2.0.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.48 to 2.0.0
- .gitignore +1 -0
- assets/gdpr-admin.css +1 -0
- autoload.php +27 -0
- bootstrap.php +33 -25
- gdpr-framework.php +8 -3
- gdpr-helper-functions.php +9 -45
- readme.txt +11 -2
- src/Admin/AdminError.php +1 -2
- src/Admin/AdminHelper.php +13 -10
- src/Admin/AdminNotice.php +1 -3
- src/Admin/AdminPrivacySafe.php +1 -1
- src/Admin/AdminTab.php +4 -3
- src/Admin/AdminTabGeneral.php +72 -38
- src/Admin/Modal.php +1 -3
- src/Admin/WordpressAdmin.php +15 -15
- src/Admin/WordpressAdminPage.php +2 -11
- src/Components/AdvancedIntegration/AdvancedIntegration.php +2 -1
- src/Components/Consent/AdminTabConsent.php +4 -4
- src/Components/Consent/ConsentAdmin.php +2 -3
- src/Components/Consent/ConsentManager.php +14 -9
- src/Components/CookiePopup/AdminTabCookiePopup.php +45 -23
- src/Components/CookiePopup/CookiePopup.php +2 -1
- src/Components/DoNotSell/DoNotSell.php +1 -1
- src/Components/PrivacyManager/PrivacyManager.php +1 -1
- src/Components/PrivacyPolicy/AdminTabPrivacyPolicy.php +30 -16
- src/Components/PrivacyPolicy/PolicyGenerator.php +15 -14
- src/Components/PrivacyPolicy/PrivacyPolicy.php +19 -14
- src/Components/PrivacySafe/PrivacySafe.php +1 -1
- src/Components/PrivacyToolsPage/PrivacyToolsPage.php +9 -5
- src/Components/PrivacyToolsPage/PrivacyToolsPageController.php +4 -2
- src/Components/PrivacyToolsPage/PrivacyToolsPageShortcode.php +6 -4
- src/Components/Support/Support.php +1 -1
- src/Components/Themes/Themes.php +19 -14
- src/Components/WordpressComments/WordpressComments.php +0 -2
- src/Components/WordpressUser/Controllers/DashboardDataPageController.php +2 -1
- src/Components/WordpressUser/DataManager.php +3 -2
- src/Components/WordpressUser/RegistrationForm.php +8 -6
- src/Components/WordpressUser/WordpressUser.php +6 -5
- src/Config.php +0 -8
- src/Container.php +0 -8
- src/DataSubject/DataRepository.php +12 -6
- src/DataSubject/DataSubjectAdmin.php +3 -1
- src/DataSubject/DataSubjectAuthenticator.php +2 -1
- src/DataSubject/DataSubjectManager.php +5 -16
- src/Helpers.php +14 -8
- src/Installer/AdminInstallerNotice.php +1 -1
- src/Installer/Installer.php +28 -19
- src/Installer/InstallerRouter.php +2 -1
- src/Installer/InstallerStep.php +9 -7
- src/Installer/InstallerWizard.php +0 -10
- src/Installer/Steps/ConfigurationPages.php +6 -4
- src/Installer/Steps/ConfigurationSettings.php +15 -13
- src/Installer/Steps/Consent.php +2 -1
- src/Installer/Steps/Disclaimer.php +2 -1
- src/Installer/Steps/Finish.php +2 -1
- src/Installer/Steps/Integrations.php +5 -3
- src/Installer/Steps/PolicyContents.php +4 -3
- src/Installer/Steps/PolicySettings.php +59 -55
- src/Modules/ContactForm7/ContactForm7.php +2 -1
- src/Modules/EddGdpr/EddGdpr.php +4 -3
- src/Modules/NewsletterGdpr/NewsletterGdpr.php +5 -2
- src/Modules/WPML/WPML.php +2 -1
- src/Modules/WooCommerceGdpr/WooCommerceGdpr.php +11 -8
- src/Setup.php +0 -126
- src/SetupAdmin.php +26 -23
- src/Singleton.php +83 -0
- src/View.php +3 -1
- vendor/autoload.php +0 -7
- vendor/composer/ClassLoader.php +0 -572
- vendor/composer/InstalledVersions.php +0 -305
- vendor/composer/LICENSE +0 -19
- vendor/composer/autoload_classmap.php +0 -232
- vendor/composer/autoload_files.php +0 -10
- vendor/composer/autoload_namespaces.php +0 -9
- vendor/composer/autoload_psr4.php +0 -16
- vendor/composer/autoload_real.php +0 -66
- vendor/composer/autoload_static.php +0 -296
- vendor/composer/installed.json +0 -373
- vendor/composer/installed.php +0 -5
- vendor/composer/platform_check.php +0 -26
- vendor/illuminate/collections/Arr.php +0 -611
- vendor/illuminate/collections/Collection.php +0 -1365
- vendor/illuminate/collections/Enumerable.php +0 -907
- vendor/illuminate/collections/HigherOrderCollectionProxy.php +0 -59
- vendor/illuminate/collections/HigherOrderWhenProxy.php +0 -55
- vendor/illuminate/collections/ItemNotFoundException.php +0 -8
- vendor/illuminate/collections/LazyCollection.php +0 -1337
- vendor/illuminate/collections/MultipleItemsFoundException.php +0 -8
- vendor/illuminate/collections/Traits/EnumeratesValues.php +0 -946
- vendor/illuminate/collections/helpers.php +0 -166
- vendor/illuminate/config/Repository.php +0 -161
- vendor/illuminate/container/BoundMethod.php +0 -167
- vendor/illuminate/container/Container.php +0 -1272
- vendor/illuminate/container/ContextualBindingBuilder.php +0 -88
- vendor/illuminate/container/EntryNotFoundException.php +0 -10
- vendor/illuminate/container/RewindableGenerator.php +0 -56
- vendor/illuminate/container/Util.php +0 -64
- vendor/illuminate/contracts/Auth/Access/Authorizable.php +0 -15
- vendor/illuminate/contracts/Auth/Access/Gate.php +0 -135
- vendor/illuminate/contracts/Auth/Authenticatable.php +0 -44
- vendor/illuminate/contracts/Auth/CanResetPassword.php +0 -20
- vendor/illuminate/contracts/Auth/Factory.php +0 -21
- vendor/illuminate/contracts/Auth/Guard.php +0 -45
- vendor/illuminate/contracts/Auth/Middleware/AuthenticatesRequests.php +0 -8
- vendor/illuminate/contracts/Auth/MustVerifyEmail.php +0 -31
- vendor/illuminate/contracts/Auth/PasswordBroker.php +0 -54
- vendor/illuminate/contracts/Auth/PasswordBrokerFactory.php +0 -14
- vendor/illuminate/contracts/Auth/StatefulGuard.php +0 -57
- vendor/illuminate/contracts/Auth/SupportsBasicAuth.php +0 -23
- vendor/illuminate/contracts/Auth/UserProvider.php +0 -45
- vendor/illuminate/contracts/Broadcasting/Broadcaster.php +0 -31
- vendor/illuminate/contracts/Broadcasting/Factory.php +0 -14
- vendor/illuminate/contracts/Broadcasting/HasBroadcastChannel.php +0 -19
- vendor/illuminate/contracts/Broadcasting/ShouldBroadcast.php +0 -13
- vendor/illuminate/contracts/Broadcasting/ShouldBroadcastNow.php +0 -8
- vendor/illuminate/contracts/Bus/Dispatcher.php +0 -60
- vendor/illuminate/contracts/Bus/QueueingDispatcher.php +0 -28
- vendor/illuminate/contracts/Cache/Factory.php +0 -14
- vendor/illuminate/contracts/Cache/Lock.php +0 -40
- vendor/illuminate/contracts/Cache/LockProvider.php +0 -24
- vendor/illuminate/contracts/Cache/LockTimeoutException.php +0 -9
- vendor/illuminate/contracts/Cache/Repository.php +0 -97
- vendor/illuminate/contracts/Cache/Store.php +0 -83
- vendor/illuminate/contracts/Config/Repository.php +0 -52
- vendor/illuminate/contracts/Console/Application.php +0 -22
- vendor/illuminate/contracts/Console/Kernel.php +0 -58
- vendor/illuminate/contracts/Container/BindingResolutionException.php +0 -10
- vendor/illuminate/contracts/Container/CircularDependencyException.php +0 -10
- vendor/illuminate/contracts/Container/Container.php +0 -164
- vendor/illuminate/contracts/Container/ContextualBindingBuilder.php +0 -28
- vendor/illuminate/contracts/Cookie/Factory.php +0 -45
- vendor/illuminate/contracts/Cookie/QueueingFactory.php +0 -28
- vendor/illuminate/contracts/Database/Eloquent/Castable.php +0 -15
- vendor/illuminate/contracts/Database/Eloquent/CastsAttributes.php +0 -27
- vendor/illuminate/contracts/Database/Eloquent/CastsInboundAttributes.php +0 -17
- vendor/illuminate/contracts/Database/Eloquent/DeviatesCastableAttributes.php +0 -27
- vendor/illuminate/contracts/Database/Eloquent/SerializesCastableAttributes.php +0 -17
- vendor/illuminate/contracts/Database/Eloquent/SupportsPartialRelations.php +0 -28
- vendor/illuminate/contracts/Database/Events/MigrationEvent.php +0 -8
- vendor/illuminate/contracts/Database/ModelIdentifier.php +0 -49
- vendor/illuminate/contracts/Debug/ExceptionHandler.php +0 -42
- vendor/illuminate/contracts/Encryption/DecryptException.php +0 -9
- vendor/illuminate/contracts/Encryption/EncryptException.php +0 -9
- vendor/illuminate/contracts/Encryption/Encrypter.php +0 -27
- vendor/illuminate/contracts/Encryption/StringEncrypter.php +0 -25
- vendor/illuminate/contracts/Events/Dispatcher.php +0 -74
- vendor/illuminate/contracts/Filesystem/Cloud.php +0 -14
- vendor/illuminate/contracts/Filesystem/Factory.php +0 -14
- vendor/illuminate/contracts/Filesystem/FileExistsException.php +0 -9
- vendor/illuminate/contracts/Filesystem/FileNotFoundException.php +0 -9
- vendor/illuminate/contracts/Filesystem/Filesystem.php +0 -177
- vendor/illuminate/contracts/Filesystem/LockTimeoutException.php +0 -9
- vendor/illuminate/contracts/Foundation/Application.php +0 -188
- vendor/illuminate/contracts/Foundation/CachesConfiguration.php +0 -25
- vendor/illuminate/contracts/Foundation/CachesRoutes.php +0 -19
- vendor/illuminate/contracts/Hashing/Hasher.php +0 -39
- vendor/illuminate/contracts/Http/Kernel.php +0 -34
- vendor/illuminate/contracts/Mail/Factory.php +0 -14
- vendor/illuminate/contracts/Mail/MailQueue.php +0 -24
- vendor/illuminate/contracts/Mail/Mailable.php +0 -68
- vendor/illuminate/contracts/Mail/Mailer.php +0 -44
- vendor/illuminate/contracts/Notifications/Dispatcher.php +0 -23
- vendor/illuminate/contracts/Notifications/Factory.php +0 -30
- vendor/illuminate/contracts/Pagination/CursorPaginator.php +0 -103
- vendor/illuminate/contracts/Pagination/LengthAwarePaginator.php +0 -27
- vendor/illuminate/contracts/Pagination/Paginator.php +0 -109
- vendor/illuminate/contracts/Pipeline/Hub.php +0 -15
- vendor/illuminate/contracts/Pipeline/Pipeline.php +0 -36
- vendor/illuminate/contracts/Queue/ClearableQueue.php +0 -14
- vendor/illuminate/contracts/Queue/EntityNotFoundException.php +0 -20
- vendor/illuminate/contracts/Queue/EntityResolver.php +0 -15
- vendor/illuminate/contracts/Queue/Factory.php +0 -14
- vendor/illuminate/contracts/Queue/Job.php +0 -145
- vendor/illuminate/contracts/Queue/Monitor.php +0 -28
- vendor/illuminate/contracts/Queue/Queue.php +0 -90
- vendor/illuminate/contracts/Queue/QueueableCollection.php +0 -31
- vendor/illuminate/contracts/Queue/QueueableEntity.php +0 -25
- vendor/illuminate/contracts/Queue/ShouldBeEncrypted.php +0 -8
- vendor/illuminate/contracts/Queue/ShouldBeUnique.php +0 -8
- vendor/illuminate/contracts/Queue/ShouldBeUniqueUntilProcessing.php +0 -8
- vendor/illuminate/contracts/Queue/ShouldQueue.php +0 -8
- vendor/illuminate/contracts/Redis/Connection.php +0 -32
- vendor/illuminate/contracts/Redis/Connector.php +0 -24
- vendor/illuminate/contracts/Redis/Factory.php +0 -14
- vendor/illuminate/contracts/Redis/LimiterTimeoutException.php +0 -9
- vendor/illuminate/contracts/Routing/BindingRegistrar.php +0 -22
- vendor/illuminate/contracts/Routing/Registrar.php +0 -95
- vendor/illuminate/contracts/Routing/ResponseFactory.php +0 -142
- vendor/illuminate/contracts/Routing/UrlGenerator.php +0 -72
- vendor/illuminate/contracts/Routing/UrlRoutable.php +0 -36
- vendor/illuminate/contracts/Session/Session.php +0 -179
- vendor/illuminate/contracts/Support/Arrayable.php +0 -13
- vendor/illuminate/contracts/Support/CanBeEscapedWhenCastToString.php +0 -14
- vendor/illuminate/contracts/Support/DeferrableProvider.php +0 -13
- vendor/illuminate/contracts/Support/DeferringDisplayableValue.php +0 -13
- vendor/illuminate/contracts/Support/Htmlable.php +0 -13
- vendor/illuminate/contracts/Support/Jsonable.php +0 -14
- vendor/illuminate/contracts/Support/MessageBag.php +0 -90
- vendor/illuminate/contracts/Support/MessageProvider.php +0 -13
- vendor/illuminate/contracts/Support/Renderable.php +0 -13
- vendor/illuminate/contracts/Support/Responsable.php +0 -14
- vendor/illuminate/contracts/Support/ValidatedData.php +0 -10
- vendor/illuminate/contracts/Translation/HasLocalePreference.php +0 -13
- vendor/illuminate/contracts/Translation/Loader.php +0 -37
- vendor/illuminate/contracts/Translation/Translator.php +0 -39
- vendor/illuminate/contracts/Validation/DataAwareRule.php +0 -14
- vendor/illuminate/contracts/Validation/Factory.php +0 -43
- vendor/illuminate/contracts/Validation/ImplicitRule.php +0 -8
- vendor/illuminate/contracts/Validation/Rule.php +0 -21
- vendor/illuminate/contracts/Validation/UncompromisedVerifier.php +0 -14
- vendor/illuminate/contracts/Validation/ValidatesWhenResolved.php +0 -13
- vendor/illuminate/contracts/Validation/Validator.php +0 -58
- vendor/illuminate/contracts/Validation/ValidatorAwareRule.php +0 -14
- vendor/illuminate/contracts/View/Engine.php +0 -15
- vendor/illuminate/contracts/View/Factory.php +0 -72
- vendor/illuminate/contracts/View/View.php +0 -28
- vendor/illuminate/macroable/Traits/Macroable.php +0 -106
- vendor/psr/container/src/ContainerExceptionInterface.php +0 -10
- vendor/psr/container/src/ContainerInterface.php +0 -34
- vendor/psr/container/src/NotFoundExceptionInterface.php +0 -10
- vendor/psr/simple-cache/src/CacheException.php +0 -10
- vendor/psr/simple-cache/src/CacheInterface.php +0 -107
- vendor/psr/simple-cache/src/InvalidArgumentException.php +0 -13
- views/admin/notices/header-privacy-safe.php +2 -1
- views/admin/notices/header-step.php +2 -1
- views/admin/notices/header.php +2 -1
- views/admin/support/contents.php +6 -6
- views/installer/header.php +2 -2
- views/installer/steps/finish.php +6 -5
- views/installer/steps/privacy-safe.php +2 -1
- views/modules/wordpress-comments/terms-checkbox.php +4 -3
- views/modules/wordpress-user/dashboard/data-page/form-delete.php +2 -1
- views/modules/wordpress-user/registration-terms-checkbox.php +5 -5
- views/privacy-tools/form-delete.php +4 -2
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.vscode/sftp.json
|
assets/gdpr-admin.css
CHANGED
@@ -7,6 +7,7 @@
|
|
7 |
border-left-color: #0095a8;
|
8 |
overflow: hidden;
|
9 |
display:block;
|
|
|
10 |
}
|
11 |
|
12 |
.notice-gdpr img {
|
7 |
border-left-color: #0095a8;
|
8 |
overflow: hidden;
|
9 |
display:block;
|
10 |
+
min-width: 300px;
|
11 |
}
|
12 |
|
13 |
.notice-gdpr img {
|
autoload.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
spl_autoload_register(function ($class) {
|
4 |
+
// namespace prefix
|
5 |
+
$prefix = 'Codelight\\GDPR\\';
|
6 |
+
|
7 |
+
// check if this is a class from our project
|
8 |
+
$len = strlen($prefix);
|
9 |
+
if (strncmp($prefix, $class, $len) !== 0) {
|
10 |
+
return; // nope, it isn't
|
11 |
+
}
|
12 |
+
|
13 |
+
// get the relative class name
|
14 |
+
// remove the namespace name
|
15 |
+
$className = substr($class, $len);
|
16 |
+
|
17 |
+
// base directory of classes
|
18 |
+
$baseDir = __DIR__ . '/src/';
|
19 |
+
// relative including
|
20 |
+
$file = $baseDir . str_replace('\\', DIRECTORY_SEPARATOR, $className) . '.php';
|
21 |
+
|
22 |
+
// if the file exists, require it
|
23 |
+
|
24 |
+
if (file_exists($file)) {
|
25 |
+
require_once($file);
|
26 |
+
}
|
27 |
+
});
|
bootstrap.php
CHANGED
@@ -1,33 +1,41 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
*/
|
7 |
-
\Codelight\GDPR\Container::getInstance()->bindIf('config', function () {
|
8 |
-
return new \Codelight\GDPR\Config(['plugin' => ['url' => plugin_dir_url(__FILE__), 'path' => plugin_dir_path(__FILE__), 'template_path' => plugin_dir_path(__FILE__) . 'views/'], 'help' => ['url' => 'https://www.data443.com/gdpr-framework/']]);
|
9 |
-
}, \true);
|
10 |
-
/**
|
11 |
-
* Set up the application container
|
12 |
-
*
|
13 |
-
* @param string $abstract
|
14 |
-
* @param array $parameters
|
15 |
-
* @param \Codelight\GDPR\Container $container
|
16 |
-
*
|
17 |
-
* @return \Codelight\GDPR\Container|mixed
|
18 |
-
*/
|
19 |
-
function gdpr($abstract = null, $parameters = [], \Codelight\GDPR\Container $container = null)
|
20 |
{
|
21 |
-
|
22 |
-
if (
|
23 |
-
return $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
-
|
26 |
}
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
add_action('plugins_loaded', function () use($gdpr_error) {
|
31 |
new \Codelight\GDPR\Updater\Updater();
|
32 |
-
new \Codelight\GDPR\Setup();
|
33 |
}, 0);
|
1 |
<?php
|
2 |
|
3 |
+
require_once(dirname(__FILE__).'/src/Singleton.php');
|
4 |
+
|
5 |
+
function gdpr($name)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
{
|
7 |
+
global $gdpr;
|
8 |
+
if ($name === 'admin-notice') {
|
9 |
+
return $gdpr->AdminNotice;
|
10 |
+
} elseif ($name === 'themes') {
|
11 |
+
return $gdpr->Themes;
|
12 |
+
} elseif ($name === 'view') {
|
13 |
+
return $gdpr->View;
|
14 |
+
} elseif ($name === 'helpers') {
|
15 |
+
return $gdpr->Helpers;
|
16 |
+
} elseif ($name === 'admin-error') {
|
17 |
+
return $gdpr->AdminError;
|
18 |
+
} elseif ($name === 'options') {
|
19 |
+
return $gdpr->Options;
|
20 |
}
|
21 |
+
die("Unknown name in gdpr: " . $name);
|
22 |
}
|
23 |
+
|
24 |
+
global $gdpr;
|
25 |
+
$gdpr = new \Codelight\GDPR\Singleton();
|
26 |
+
$gdpr->init(__FILE__);
|
27 |
+
|
28 |
+
add_action('init', function() {
|
29 |
+
|
30 |
+
if (!is_admin()) {
|
31 |
+
return;
|
32 |
+
}
|
33 |
+
|
34 |
+
new \Codelight\GDPR\SetupAdmin();
|
35 |
+
}, 0);
|
36 |
+
|
37 |
+
include_once(dirname(__FILE__).'/src/Updater/Updater.php');
|
38 |
+
|
39 |
add_action('plugins_loaded', function () use($gdpr_error) {
|
40 |
new \Codelight\GDPR\Updater\Updater();
|
|
|
41 |
}, 0);
|
gdpr-framework.php
CHANGED
@@ -4,8 +4,10 @@
|
|
4 |
* Plugin Name: The GDPR Framework
|
5 |
* Plugin URI: https://www.data443.com/gdpr-framework/
|
6 |
* Description: Tools to help make your website GDPR-compliant. Fully documented, extendable and developer-friendly.
|
7 |
-
* Version: 1.0.48
|
8 |
* Author: Data443
|
|
|
|
|
|
|
9 |
* Author URI: https://www.data443.com/
|
10 |
* Text Domain: gdpr-framework
|
11 |
* Domain Path: /languages
|
@@ -18,7 +20,7 @@ if (!defined('WPINC'))
|
|
18 |
die;
|
19 |
}
|
20 |
|
21 |
-
define('GDPR_FRAMEWORK_VERSION', '
|
22 |
|
23 |
add_shortcode( 'gdpr_privacy_safe', 'render_privacy_safe' ); // preserve backward compatibility
|
24 |
add_shortcode( 'data443_privacy_safe', 'render_privacy_safe' );
|
@@ -27,7 +29,8 @@ add_shortcode( 'data443_privacy_safe', 'render_privacy_safe' );
|
|
27 |
* Render WHMCS Seal Generator Addon Javascript
|
28 |
*/
|
29 |
function render_privacy_safe() {
|
30 |
-
|
|
|
31 |
wp_localize_script(
|
32 |
'gdpr_whmcs_seal_generator',
|
33 |
'gdpr_seal_var',
|
@@ -202,6 +205,8 @@ function my_profile_update( $user_id, $old_user_data )
|
|
202 |
$model->savelog($user_id,$userdata);
|
203 |
}
|
204 |
|
|
|
|
|
205 |
register_activation_hook(__FILE__, function () {
|
206 |
if (in_array('gdpr-framework-pro/gdpr-framework.php', apply_filters('active_plugins', get_option('active_plugins')))) {
|
207 |
die('This plugin could not be activated because the PRO version of this plugin is active.');
|
4 |
* Plugin Name: The GDPR Framework
|
5 |
* Plugin URI: https://www.data443.com/gdpr-framework/
|
6 |
* Description: Tools to help make your website GDPR-compliant. Fully documented, extendable and developer-friendly.
|
|
|
7 |
* Author: Data443
|
8 |
+
* Requires at least: 4.7
|
9 |
+
* Requires PHP: 5.6
|
10 |
+
* Version: 2.0.0
|
11 |
* Author URI: https://www.data443.com/
|
12 |
* Text Domain: gdpr-framework
|
13 |
* Domain Path: /languages
|
20 |
die;
|
21 |
}
|
22 |
|
23 |
+
define('GDPR_FRAMEWORK_VERSION', '2.0.0');
|
24 |
|
25 |
add_shortcode( 'gdpr_privacy_safe', 'render_privacy_safe' ); // preserve backward compatibility
|
26 |
add_shortcode( 'data443_privacy_safe', 'render_privacy_safe' );
|
29 |
* Render WHMCS Seal Generator Addon Javascript
|
30 |
*/
|
31 |
function render_privacy_safe() {
|
32 |
+
global $gdpr;
|
33 |
+
wp_register_script( 'gdpr_whmcs_seal_generator', $gdpr->PluginUrl . 'assets/js/showseal.js', null, true, true );
|
34 |
wp_localize_script(
|
35 |
'gdpr_whmcs_seal_generator',
|
36 |
'gdpr_seal_var',
|
205 |
$model->savelog($user_id,$userdata);
|
206 |
}
|
207 |
|
208 |
+
include_once(dirname(__FILE__).'/autoload.php');
|
209 |
+
|
210 |
register_activation_hook(__FILE__, function () {
|
211 |
if (in_array('gdpr-framework-pro/gdpr-framework.php', apply_filters('active_plugins', get_option('active_plugins')))) {
|
212 |
die('This plugin could not be activated because the PRO version of this plugin is active.');
|
gdpr-helper-functions.php
CHANGED
@@ -64,51 +64,14 @@ function add_consent_deny_cookies(){
|
|
64 |
}
|
65 |
}
|
66 |
|
67 |
-
/**
|
68 |
-
* Load dependencies
|
69 |
-
*/
|
70 |
-
if (!class_exists('\Codelight\GDPR\Container'))
|
71 |
-
{
|
72 |
-
if (!file_exists($composer = __DIR__ . '/vendor/autoload.php')) {
|
73 |
-
$gdpr_error(
|
74 |
-
_x(
|
75 |
-
'You appear to be running a development version of GDPR. You must run <code>composer install</code> from the plugin directory.',
|
76 |
-
'(Admin)',
|
77 |
-
'gdpr-framework'
|
78 |
-
),
|
79 |
-
_x(
|
80 |
-
'Autoloader not found.',
|
81 |
-
'(Admin)',
|
82 |
-
'gdpr-framework'
|
83 |
-
)
|
84 |
-
);
|
85 |
-
}
|
86 |
-
require_once $composer;
|
87 |
-
}
|
88 |
-
|
89 |
-
if (!class_exists('\Data443\gdpr\framework\Illuminate\Container\Container'))
|
90 |
-
{
|
91 |
-
$gdpr_error(
|
92 |
-
_x(
|
93 |
-
'You appear to be running a development version of GDPR. You must run <code>"composer build-with-prefix"</code> from the plugin directory.',
|
94 |
-
'(Admin)',
|
95 |
-
'gdpr-framework'
|
96 |
-
),
|
97 |
-
_x(
|
98 |
-
'Modified Vendor Namespace not found.',
|
99 |
-
'(Admin)',
|
100 |
-
'gdpr-framework'
|
101 |
-
)
|
102 |
-
);
|
103 |
-
}
|
104 |
-
|
105 |
function popup_gdpr()
|
106 |
{
|
107 |
-
|
|
|
108 |
|
109 |
-
wp_enqueue_style( 'gdpr-framework-cookieconsent-css'
|
110 |
|
111 |
-
wp_register_script( 'gdpr-framework-cookieconsent-js', gdpr
|
112 |
|
113 |
$gdpr_policy_page_id = get_option('gdpr_policy_page');
|
114 |
if($gdpr_policy_page_id)
|
@@ -238,7 +201,7 @@ function popup_gdpr()
|
|
238 |
$get_gdpr_data = array('gdpr_url'=>$gdpr_policy_page_url,'gdpr_message'=>$gdpr_message,'gdpr_dismiss'=>$gdpr_dismiss,'gdpr_allow'=>$gdpr_allow,'gdpr_header'=>$gdpr_header,'gdpr_link'=>$gdpr_link,'gdpr_popup_position'=>$position,'gdpr_popup_type'=>$type,'gdpr_popup_static'=>$static,'gdpr_popup_background'=>$gdpr_popup_background,'gdpr_popup_text'=>$gdpr_popup_text,'gdpr_button_background'=>$gdpr_button_background,'gdpr_button_text'=>$gdpr_button_text,'gdpr_button_border'=>$gdpr_button_border,'gdpr_popup_theme'=>$gdpr_popup_theme,'gdpr_hide'=>$gdpr_hide,'gdpr_popup'=>$gdpr_policy_popup,'policy'=>$policy_text,'ajaxurl' => admin_url( 'admin-ajax.php' ),'gdpr_link_target' => $gdpr_link_target);
|
239 |
|
240 |
wp_localize_script( 'gdpr-framework-cookieconsent-js', 'gdpr_policy_page', $get_gdpr_data );
|
241 |
-
wp_enqueue_script( 'gdpr-framework-cookieconsent-js', gdpr
|
242 |
|
243 |
}
|
244 |
/**
|
@@ -267,9 +230,10 @@ if($enabled_gdpf_cookie_popup)
|
|
267 |
add_filter('plugin_action_links_gdpr-framework/gdpr-framework.php', 'gdpr_plugin_links');
|
268 |
|
269 |
function gdpr_plugin_links($links)
|
270 |
-
{
|
271 |
-
|
272 |
-
$
|
|
|
273 |
$settings = array();
|
274 |
$settings[] = "<a href='$url'>" . __('Settings', 'gdpr-framework' ) . '</a>';
|
275 |
$settings[] = "<a href='$premium' target='_blank'>" . __('PREMIUM', 'gdpr-framework' ) . '</a>';
|
64 |
}
|
65 |
}
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
function popup_gdpr()
|
68 |
{
|
69 |
+
global $gdpr;
|
70 |
+
wp_enqueue_script( 'gdpr-framework-cookieconsent-min-js', $gdpr->PluginUrl .'assets/cookieconsent.min.js' );
|
71 |
|
72 |
+
wp_enqueue_style( 'gdpr-framework-cookieconsent-css',$gdpr->PluginUrl .'assets/cookieconsent.min.css');
|
73 |
|
74 |
+
wp_register_script( 'gdpr-framework-cookieconsent-js', $gdpr->PluginUrl . 'assets/ajax-cookieconsent.js', array(), false, true );
|
75 |
|
76 |
$gdpr_policy_page_id = get_option('gdpr_policy_page');
|
77 |
if($gdpr_policy_page_id)
|
201 |
$get_gdpr_data = array('gdpr_url'=>$gdpr_policy_page_url,'gdpr_message'=>$gdpr_message,'gdpr_dismiss'=>$gdpr_dismiss,'gdpr_allow'=>$gdpr_allow,'gdpr_header'=>$gdpr_header,'gdpr_link'=>$gdpr_link,'gdpr_popup_position'=>$position,'gdpr_popup_type'=>$type,'gdpr_popup_static'=>$static,'gdpr_popup_background'=>$gdpr_popup_background,'gdpr_popup_text'=>$gdpr_popup_text,'gdpr_button_background'=>$gdpr_button_background,'gdpr_button_text'=>$gdpr_button_text,'gdpr_button_border'=>$gdpr_button_border,'gdpr_popup_theme'=>$gdpr_popup_theme,'gdpr_hide'=>$gdpr_hide,'gdpr_popup'=>$gdpr_policy_popup,'policy'=>$policy_text,'ajaxurl' => admin_url( 'admin-ajax.php' ),'gdpr_link_target' => $gdpr_link_target);
|
202 |
|
203 |
wp_localize_script( 'gdpr-framework-cookieconsent-js', 'gdpr_policy_page', $get_gdpr_data );
|
204 |
+
wp_enqueue_script( 'gdpr-framework-cookieconsent-js', $gdpr->PluginUrl . 'assets/ajax-cookieconsent.js');
|
205 |
|
206 |
}
|
207 |
/**
|
230 |
add_filter('plugin_action_links_gdpr-framework/gdpr-framework.php', 'gdpr_plugin_links');
|
231 |
|
232 |
function gdpr_plugin_links($links)
|
233 |
+
{ global $gdpr;
|
234 |
+
|
235 |
+
$url = $gdpr->Helpers->getAdminUrl();
|
236 |
+
$premium = $gdpr->Helpers->premiumStore();
|
237 |
$settings = array();
|
238 |
$settings[] = "<a href='$url'>" . __('Settings', 'gdpr-framework' ) . '</a>';
|
239 |
$settings[] = "<a href='$premium' target='_blank'>" . __('PREMIUM', 'gdpr-framework' ) . '</a>';
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: Data443
|
3 |
Tags: gdpr, compliance, security, privacy, wordpress gdpr, eu privacy directive, eu cookie law, california privacy law, privacy law, general data protection, ccpa, gdpr law
|
4 |
Requires at least: 4.7
|
5 |
-
Tested up to: 5.
|
6 |
-
Requires PHP:
|
7 |
Stable tag: trunk
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
|
@@ -117,6 +117,15 @@ We are also planning to add other important privacy-related features missing fro
|
|
117 |
|
118 |
== Change log ==
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
= 1.0.48 (11/30/2021) =
|
121 |
* FRAM-294 Reduce PHP Requirement from 7.4 to 7.3
|
122 |
|
2 |
Contributors: Data443
|
3 |
Tags: gdpr, compliance, security, privacy, wordpress gdpr, eu privacy directive, eu cookie law, california privacy law, privacy law, general data protection, ccpa, gdpr law
|
4 |
Requires at least: 4.7
|
5 |
+
Tested up to: 5.9
|
6 |
+
Requires PHP: 5.6
|
7 |
Stable tag: trunk
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
|
117 |
|
118 |
== Change log ==
|
119 |
|
120 |
+
= 2.0.0 (2/15/2022) =
|
121 |
+
|
122 |
+
* Fram-306 Streamline the code to address malware warning from 3rd party code
|
123 |
+
* Reduced PHP requirement to 5.6
|
124 |
+
|
125 |
+
= 1.0.49 (1/18/2022) =
|
126 |
+
* Fram-303 Automatically push a new release from GitHub to WordPress
|
127 |
+
* Fram-304 Add accessibility markup to the terms checkbox
|
128 |
+
|
129 |
= 1.0.48 (11/30/2021) =
|
130 |
* FRAM-294 Reduce PHP Requirement from 7.4 to 7.3
|
131 |
|
src/Admin/AdminError.php
CHANGED
@@ -3,13 +3,12 @@
|
|
3 |
|
4 |
namespace Codelight\GDPR\Admin;
|
5 |
|
6 |
-
|
7 |
class AdminError extends AdminNotice
|
8 |
{
|
9 |
public function render()
|
10 |
{
|
11 |
if (!$this->template) {
|
12 |
-
|
13 |
}
|
14 |
|
15 |
echo gdpr('view')->render($this->template, $this->data);
|
3 |
|
4 |
namespace Codelight\GDPR\Admin;
|
5 |
|
|
|
6 |
class AdminError extends AdminNotice
|
7 |
{
|
8 |
public function render()
|
9 |
{
|
10 |
if (!$this->template) {
|
11 |
+
return;
|
12 |
}
|
13 |
|
14 |
echo gdpr('view')->render($this->template, $this->data);
|
src/Admin/AdminHelper.php
CHANGED
@@ -14,7 +14,8 @@ class AdminHelper
|
|
14 |
|
15 |
protected function toolsHelper()
|
16 |
{
|
17 |
-
$
|
|
|
18 |
|
19 |
// Display the notice only on Tools page
|
20 |
if (!$toolsPage || !isset($_GET['post']) || $_GET['post'] !== $toolsPage) {
|
@@ -42,7 +43,8 @@ class AdminHelper
|
|
42 |
|
43 |
protected function policyHelper()
|
44 |
{
|
45 |
-
$
|
|
|
46 |
|
47 |
// Display the notice only on Policy page
|
48 |
if (!$policyPage || !isset($_GET['post']) || $_GET['post'] !== $policyPage) {
|
@@ -59,22 +61,23 @@ class AdminHelper
|
|
59 |
|
60 |
protected function settingsHelper()
|
61 |
{
|
62 |
-
|
63 |
-
|
|
|
64 |
$this->renderSettingsHelperNotice();
|
65 |
}
|
66 |
|
67 |
-
if ('download_and_notify' === gdpr
|
68 |
-
if (
|
69 |
$this->renderSettingsHelperNotice();
|
70 |
}
|
71 |
}
|
72 |
|
73 |
-
if ('anonymize_and_notify' === gdpr
|
74 |
-
'delete_and_notify' === gdpr
|
75 |
-
'notify' === gdpr
|
76 |
) {
|
77 |
-
if (
|
78 |
$this->renderSettingsHelperNotice();
|
79 |
}
|
80 |
}
|
14 |
|
15 |
protected function toolsHelper()
|
16 |
{
|
17 |
+
global $gdpr;
|
18 |
+
$toolsPage = $gdpr->Options->get('tools_page');
|
19 |
|
20 |
// Display the notice only on Tools page
|
21 |
if (!$toolsPage || !isset($_GET['post']) || $_GET['post'] !== $toolsPage) {
|
43 |
|
44 |
protected function policyHelper()
|
45 |
{
|
46 |
+
global $gdpr;
|
47 |
+
$policyPage = $gdpr->Options->get('policy_page');
|
48 |
|
49 |
// Display the notice only on Policy page
|
50 |
if (!$policyPage || !isset($_GET['post']) || $_GET['post'] !== $policyPage) {
|
61 |
|
62 |
protected function settingsHelper()
|
63 |
{
|
64 |
+
global $gdpr;
|
65 |
+
if ($gdpr->Options->get('is_installed') &&
|
66 |
+
((!$gdpr->Options->get('tools_page') || is_null(get_post($gdpr->Options->get('tools_page'))))) && !$gdpr->Options->get('custom_tools_page')) {
|
67 |
$this->renderSettingsHelperNotice();
|
68 |
}
|
69 |
|
70 |
+
if ('download_and_notify' === $gdpr->Options->get('export_action') || 'notify' === $gdpr->Options->get('export_action')) {
|
71 |
+
if (!$gdpr->Options->get('export_action_email')) {
|
72 |
$this->renderSettingsHelperNotice();
|
73 |
}
|
74 |
}
|
75 |
|
76 |
+
if ('anonymize_and_notify' === $gdpr->Options->get('delete_action') ||
|
77 |
+
'delete_and_notify' === $gdpr->Options->get('delete_action') ||
|
78 |
+
'notify' === $gdpr->Options->get('delete_action')
|
79 |
) {
|
80 |
+
if (!$gdpr->Options->get('delete_action_email')) {
|
81 |
$this->renderSettingsHelperNotice();
|
82 |
}
|
83 |
}
|
src/Admin/AdminNotice.php
CHANGED
@@ -9,8 +9,6 @@ class AdminNotice
|
|
9 |
protected $data;
|
10 |
|
11 |
/**
|
12 |
-
* todo: replace with a proper factory pattern via gdpr()?
|
13 |
-
*
|
14 |
* AdminNotice constructor.
|
15 |
*/
|
16 |
public function __construct()
|
@@ -31,7 +29,7 @@ class AdminNotice
|
|
31 |
public function render()
|
32 |
{
|
33 |
if (!$this->template) {
|
34 |
-
|
35 |
}
|
36 |
|
37 |
echo gdpr('view')->render('admin/notices/header');
|
9 |
protected $data;
|
10 |
|
11 |
/**
|
|
|
|
|
12 |
* AdminNotice constructor.
|
13 |
*/
|
14 |
public function __construct()
|
29 |
public function render()
|
30 |
{
|
31 |
if (!$this->template) {
|
32 |
+
return;
|
33 |
}
|
34 |
|
35 |
echo gdpr('view')->render('admin/notices/header');
|
src/Admin/AdminPrivacySafe.php
CHANGED
@@ -9,7 +9,7 @@ class AdminPrivacySafe extends AdminNotice
|
|
9 |
public function render()
|
10 |
{
|
11 |
if (!$this->template) {
|
12 |
-
|
13 |
}
|
14 |
|
15 |
echo gdpr('view')->render('admin/notices/header-privacy-safe');
|
9 |
public function render()
|
10 |
{
|
11 |
if (!$this->template) {
|
12 |
+
return;
|
13 |
}
|
14 |
|
15 |
echo gdpr('view')->render('admin/notices/header-privacy-safe');
|
src/Admin/AdminTab.php
CHANGED
@@ -95,6 +95,7 @@ abstract class AdminTab implements AdminTabInterface
|
|
95 |
*/
|
96 |
public function renderContents()
|
97 |
{
|
|
|
98 |
$tabs = array("general", "cookie-popup", "consent", "privacy-policy", "do-not-sell", "support");
|
99 |
ob_start();
|
100 |
|
@@ -166,7 +167,7 @@ abstract class AdminTab implements AdminTabInterface
|
|
166 |
<div style="clear:both; margin-top: 2px;"></div>
|
167 |
<div>
|
168 |
<div style="float:left; vertical-align:middle; height:24px; margin-right:5px; margin-top:-3px;">
|
169 |
-
<img src="
|
170 |
</div>
|
171 |
<p style="margin-top:0px;">Custom Consent Text</p>
|
172 |
</div>
|
@@ -174,7 +175,7 @@ abstract class AdminTab implements AdminTabInterface
|
|
174 |
<div style="clear:both; margin-top: 2px;"></div>
|
175 |
<div>
|
176 |
<div style="float:left; vertical-align:middle; height:24px; margin-right:5px; margin-top:-3px;">
|
177 |
-
<img src="
|
178 |
</div>
|
179 |
<p style="margin-top:0px;">Data Rectification</p>
|
180 |
</div>
|
@@ -182,7 +183,7 @@ abstract class AdminTab implements AdminTabInterface
|
|
182 |
<div style="clear:both; margin-top: 2px;"></div>
|
183 |
<div>
|
184 |
<div style="float:left; vertical-align:middle; height:24px; margin-right:5px; margin-top:-3px;">
|
185 |
-
<img src="
|
186 |
</div>
|
187 |
<p style="margin-top:0px;">Custom relative URLs for the Privacy Policy and other files</p>
|
188 |
</div>
|
95 |
*/
|
96 |
public function renderContents()
|
97 |
{
|
98 |
+
global $gdpr;
|
99 |
$tabs = array("general", "cookie-popup", "consent", "privacy-policy", "do-not-sell", "support");
|
100 |
ob_start();
|
101 |
|
167 |
<div style="clear:both; margin-top: 2px;"></div>
|
168 |
<div>
|
169 |
<div style="float:left; vertical-align:middle; height:24px; margin-right:5px; margin-top:-3px;">
|
170 |
+
<img src="<?=$gdpr->PluginUrl?>/assets/images/tick.png" />
|
171 |
</div>
|
172 |
<p style="margin-top:0px;">Custom Consent Text</p>
|
173 |
</div>
|
175 |
<div style="clear:both; margin-top: 2px;"></div>
|
176 |
<div>
|
177 |
<div style="float:left; vertical-align:middle; height:24px; margin-right:5px; margin-top:-3px;">
|
178 |
+
<img src="<?=$gdpr->PluginUrl?>/assets/images/tick.png" />
|
179 |
</div>
|
180 |
<p style="margin-top:0px;">Data Rectification</p>
|
181 |
</div>
|
183 |
<div style="clear:both; margin-top: 2px;"></div>
|
184 |
<div>
|
185 |
<div style="float:left; vertical-align:middle; height:24px; margin-right:5px; margin-top:-3px;">
|
186 |
+
<img src="<?=$gdpr->PluginUrl?>/assets/images/tick.png" />
|
187 |
</div>
|
188 |
<p style="margin-top:0px;">Custom relative URLs for the Privacy Policy and other files</p>
|
189 |
</div>
|
src/Admin/AdminTabGeneral.php
CHANGED
@@ -305,109 +305,124 @@ class AdminTabGeneral extends AdminTab
|
|
305 |
|
306 |
public function renderEnableCheckbox()
|
307 |
{
|
308 |
-
$
|
|
|
309 |
echo gdpr('view')->render('admin/general/enable', compact('enabled'));
|
310 |
}
|
311 |
|
312 |
public function renderEnableCheckboxtac()
|
313 |
{
|
314 |
-
$
|
|
|
315 |
echo gdpr('view')->render('admin/general/enable-tac', compact('enabled'));
|
316 |
}
|
317 |
|
318 |
public function renderCommentCheckbox()
|
319 |
{
|
|
|
320 |
$content['option_name'] = 'comment_checkbox';
|
321 |
-
$content['value'] = gdpr
|
322 |
$content['option'] = _x('Disable Checkbox For Comments', '(Admin)', 'gdpr-framework');
|
323 |
echo gdpr('view')->render('admin/general/disble-checkbox', compact('content'));
|
324 |
}
|
325 |
|
326 |
public function renderRegisterCheckbox()
|
327 |
-
{
|
|
|
328 |
$content['option_name'] = 'register_checkbox';
|
329 |
-
$content['value'] = gdpr
|
330 |
$content['option'] = _x('Disable Checkbox For Register Form', '(Admin)', 'gdpr-framework');
|
331 |
echo gdpr('view')->render('admin/general/disble-checkbox', compact('content'));
|
332 |
}
|
333 |
|
334 |
public function renderEnableCheckboxpopup()
|
335 |
{
|
336 |
-
$
|
|
|
337 |
echo gdpr('view')->render('admin/general/enable-popup', compact('enabled'));
|
338 |
}
|
339 |
|
340 |
public function renderEnableOneTimeCheckboxpopup()
|
341 |
{
|
342 |
-
$
|
|
|
343 |
echo gdpr('view')->render('admin/general/enable-onetime-popup', compact('enabled'));
|
344 |
}
|
345 |
|
346 |
public function renderheaderCheckboxpopup()
|
347 |
{
|
348 |
-
$
|
|
|
349 |
echo gdpr('view')->render('admin/general/enable_popup_header', compact('content'));
|
350 |
}
|
351 |
public function rendercontentCheckboxpopup()
|
352 |
{
|
353 |
-
$
|
|
|
354 |
echo gdpr('view')->render('admin/general/enable_popup_content', compact('content'));
|
355 |
}
|
356 |
|
357 |
public function renderNameFrom()
|
358 |
{
|
359 |
-
$
|
|
|
360 |
echo gdpr('view')->render('admin/general/name_from', compact('content'));
|
361 |
}
|
362 |
|
363 |
public function renderEmailFrom()
|
364 |
{
|
365 |
-
$
|
|
|
366 |
echo gdpr('view')->render('admin/general/email_from', compact('content'));
|
367 |
}
|
368 |
|
369 |
public function renderpopupBackgroundcolor()
|
370 |
{
|
371 |
-
$
|
|
|
372 |
$content['option'] = 'background';
|
373 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
374 |
}
|
375 |
|
376 |
public function renderpopupTextcolor()
|
377 |
{
|
378 |
-
$
|
|
|
379 |
$content['option'] = 'text';
|
380 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
381 |
}
|
382 |
|
383 |
public function renderbuttonBackgroundcolor()
|
384 |
{
|
385 |
-
|
386 |
-
$content['value'] = gdpr
|
387 |
$content['option'] = 'button_background';
|
388 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
389 |
}
|
390 |
public function renderbuttonTextcolor()
|
391 |
{
|
392 |
-
$
|
|
|
393 |
$content['option'] = 'button_text';
|
394 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
395 |
}
|
396 |
|
397 |
public function renderborderTextcolor()
|
398 |
{
|
399 |
-
$
|
|
|
400 |
$content['option'] = 'border_text';
|
401 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
402 |
}
|
403 |
|
404 |
public function renderPrivacyToolsPageSelector()
|
405 |
{
|
|
|
406 |
wp_dropdown_pages([
|
407 |
'name' => 'gdpr_tools_page',
|
408 |
'show_option_none' => _x('— Select —', '(Admin)', 'gdpr-framework'),
|
409 |
'option_none_value' => '0',
|
410 |
-
'selected' => gdpr
|
411 |
'class' => 'js-gdpr-select2 gdpr-select',
|
412 |
'post_status' => 'publish,draft',
|
413 |
]);
|
@@ -419,11 +434,12 @@ class AdminTabGeneral extends AdminTab
|
|
419 |
*/
|
420 |
public function renderPolicyPageSelector()
|
421 |
{
|
|
|
422 |
wp_dropdown_pages([
|
423 |
'name' => 'gdpr_policy_page',
|
424 |
'show_option_none' => _x('— Select —', '(Admin)', 'gdpr-framework'),
|
425 |
'option_none_value' => '0',
|
426 |
-
'selected' => gdpr
|
427 |
'class' => 'js-gdpr-select2 gdpr-select',
|
428 |
'post_status' => 'publish,draft',
|
429 |
]);
|
@@ -432,23 +448,26 @@ class AdminTabGeneral extends AdminTab
|
|
432 |
|
433 |
public function renderPolicyCustomPageSelector()
|
434 |
{
|
435 |
-
$
|
|
|
436 |
echo gdpr('view')->render('admin/general/custom-policy-url', compact('content'));
|
437 |
}
|
438 |
|
439 |
public function renderToolsCustomPageSelector()
|
440 |
{
|
441 |
-
$
|
|
|
442 |
echo gdpr('view')->render('admin/general/custom-tools-url', compact('content'));
|
443 |
}
|
444 |
|
445 |
public function renderTermsPageSelector()
|
446 |
{
|
|
|
447 |
wp_dropdown_pages([
|
448 |
'name' => 'gdpr_terms_page',
|
449 |
'show_option_none' => _x('— Select —', '(Admin)', 'gdpr-framework'),
|
450 |
'option_none_value' => '0',
|
451 |
-
'selected' => gdpr
|
452 |
'class' => 'js-gdpr-select2 gdpr-select',
|
453 |
'post_status' => 'publish,draft',
|
454 |
]);
|
@@ -457,55 +476,63 @@ class AdminTabGeneral extends AdminTab
|
|
457 |
|
458 |
public function renderCustomTermsPageSelector()
|
459 |
{
|
460 |
-
$
|
|
|
461 |
echo gdpr('view')->render('admin/general/custom-terms-url', compact('content'));
|
462 |
}
|
463 |
|
464 |
public function renderExportActionSelector()
|
465 |
{
|
466 |
-
$
|
|
|
467 |
echo gdpr('view')->render('admin/general/export-action', compact('exportAction'));
|
468 |
echo gdpr('view')->render('admin/general/description-export-action');
|
469 |
}
|
470 |
public function renderPopupThemeSelector()
|
471 |
{
|
472 |
-
$
|
|
|
473 |
echo gdpr('view')->render('admin/general/theme-action', compact('themeAction'));
|
474 |
echo gdpr('view')->render('admin/general/description-theme-action');
|
475 |
}
|
476 |
public function renderPopupPositionSelector()
|
477 |
{
|
478 |
-
$
|
|
|
479 |
echo gdpr('view')->render('admin/general/position-action', compact('positionAction'));
|
480 |
echo gdpr('view')->render('admin/general/description-position-action');
|
481 |
}
|
482 |
|
483 |
public function renderExportActionEmail()
|
484 |
{
|
485 |
-
$
|
|
|
486 |
echo gdpr('view')->render('admin/general/export-action-email', compact('exportActionEmail'));
|
487 |
}
|
488 |
|
489 |
public function renderDeleteActionSelector()
|
490 |
{
|
491 |
-
$
|
|
|
492 |
echo gdpr('view')->render('admin/general/delete-action', compact('deleteAction'));
|
493 |
echo gdpr('view')->render('admin/general/description-delete-action');
|
494 |
}
|
495 |
|
496 |
public function renderDeleteActionReassign()
|
497 |
{
|
498 |
-
$
|
|
|
499 |
echo gdpr('view')->render('admin/general/delete-action-reassign', compact('reassign'));
|
500 |
}
|
501 |
|
502 |
public function renderDeleteActionReassignUser()
|
503 |
{
|
|
|
504 |
wp_dropdown_users([
|
505 |
'name' => 'gdpr_delete_action_reassign_user',
|
506 |
'show_option_none' => _x('— Select —', '(Admin)', 'gdpr-framework'),
|
507 |
'option_none_value' => '0',
|
508 |
-
'selected' => gdpr
|
509 |
'class' => 'js-gdpr-select2 gdpr-select',
|
510 |
'role__in' => apply_filters('gdpr/options/reassign/roles', ['administrator', 'editor']),
|
511 |
]);
|
@@ -513,40 +540,47 @@ class AdminTabGeneral extends AdminTab
|
|
513 |
|
514 |
public function renderDeleteActionEmail()
|
515 |
{
|
516 |
-
$
|
|
|
517 |
echo gdpr('view')->render('admin/general/delete-action-email', compact('deleteActionEmail'));
|
518 |
}
|
519 |
|
520 |
public function renderStylesheetSelector()
|
521 |
{
|
522 |
-
$
|
|
|
523 |
echo gdpr('view')->render('admin/general/stylesheet', compact('enabled'));
|
524 |
}
|
525 |
|
526 |
public function renderThemeCompatibilitySelector()
|
527 |
{
|
528 |
-
$
|
|
|
529 |
echo gdpr('view')->render('admin/general/theme-compatibility', compact('enabled'));
|
530 |
}
|
531 |
|
532 |
public function renderwooCompatibilitySelector()
|
533 |
{
|
534 |
-
$
|
|
|
535 |
echo gdpr('view')->render('admin/general/woo-compatibility', compact('enabled'));
|
536 |
}
|
537 |
public function renderwoodisablewooSelector()
|
538 |
{
|
539 |
-
$
|
|
|
540 |
echo gdpr('view')->render('admin/general/woo-disable_checkbox', compact('enabled'));
|
541 |
}
|
542 |
public function renderwooregisterdisablewooSelector()
|
543 |
{
|
544 |
-
$
|
|
|
545 |
echo gdpr('view')->render('admin/general/woo-disable_register_checkbox', compact('enabled'));
|
546 |
}
|
547 |
public function rendereddCompatibilitySelector()
|
548 |
-
{
|
549 |
-
$
|
|
|
550 |
echo gdpr('view')->render('admin/general/edd-compatibility', compact('enabled'));
|
551 |
}
|
552 |
}
|
305 |
|
306 |
public function renderEnableCheckbox()
|
307 |
{
|
308 |
+
global $gdpr;
|
309 |
+
$enabled = $gdpr->Options->get('enable');
|
310 |
echo gdpr('view')->render('admin/general/enable', compact('enabled'));
|
311 |
}
|
312 |
|
313 |
public function renderEnableCheckboxtac()
|
314 |
{
|
315 |
+
global $gdpr;
|
316 |
+
$enabled = $gdpr->Options->get('enable_tac');
|
317 |
echo gdpr('view')->render('admin/general/enable-tac', compact('enabled'));
|
318 |
}
|
319 |
|
320 |
public function renderCommentCheckbox()
|
321 |
{
|
322 |
+
global $gdpr;
|
323 |
$content['option_name'] = 'comment_checkbox';
|
324 |
+
$content['value'] = $gdpr->Options->get('comment_checkbox');
|
325 |
$content['option'] = _x('Disable Checkbox For Comments', '(Admin)', 'gdpr-framework');
|
326 |
echo gdpr('view')->render('admin/general/disble-checkbox', compact('content'));
|
327 |
}
|
328 |
|
329 |
public function renderRegisterCheckbox()
|
330 |
+
{
|
331 |
+
global $gdpr;
|
332 |
$content['option_name'] = 'register_checkbox';
|
333 |
+
$content['value'] = $gdpr->Options->get('register_checkbox');
|
334 |
$content['option'] = _x('Disable Checkbox For Register Form', '(Admin)', 'gdpr-framework');
|
335 |
echo gdpr('view')->render('admin/general/disble-checkbox', compact('content'));
|
336 |
}
|
337 |
|
338 |
public function renderEnableCheckboxpopup()
|
339 |
{
|
340 |
+
global $gdpr;
|
341 |
+
$enabled = $gdpr->Options->get('enable_popup');
|
342 |
echo gdpr('view')->render('admin/general/enable-popup', compact('enabled'));
|
343 |
}
|
344 |
|
345 |
public function renderEnableOneTimeCheckboxpopup()
|
346 |
{
|
347 |
+
global $gdpr;
|
348 |
+
$enabled = $gdpr->Options->get('onetime_popup');
|
349 |
echo gdpr('view')->render('admin/general/enable-onetime-popup', compact('enabled'));
|
350 |
}
|
351 |
|
352 |
public function renderheaderCheckboxpopup()
|
353 |
{
|
354 |
+
global $gdpr;
|
355 |
+
$content = $gdpr->Options->get('header');
|
356 |
echo gdpr('view')->render('admin/general/enable_popup_header', compact('content'));
|
357 |
}
|
358 |
public function rendercontentCheckboxpopup()
|
359 |
{
|
360 |
+
global $gdpr;
|
361 |
+
$content = $gdpr->Options->get('popup_content');
|
362 |
echo gdpr('view')->render('admin/general/enable_popup_content', compact('content'));
|
363 |
}
|
364 |
|
365 |
public function renderNameFrom()
|
366 |
{
|
367 |
+
global $gdpr;
|
368 |
+
$content = $gdpr->Options->get('name_from');
|
369 |
echo gdpr('view')->render('admin/general/name_from', compact('content'));
|
370 |
}
|
371 |
|
372 |
public function renderEmailFrom()
|
373 |
{
|
374 |
+
global $gdpr;
|
375 |
+
$content = $gdpr->Options->get('email_from');
|
376 |
echo gdpr('view')->render('admin/general/email_from', compact('content'));
|
377 |
}
|
378 |
|
379 |
public function renderpopupBackgroundcolor()
|
380 |
{
|
381 |
+
global $gdpr;
|
382 |
+
$content['value'] = $gdpr->Options->get('popup_background');
|
383 |
$content['option'] = 'background';
|
384 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
385 |
}
|
386 |
|
387 |
public function renderpopupTextcolor()
|
388 |
{
|
389 |
+
global $gdpr;
|
390 |
+
$content['value'] = $gdpr->Options->get('popup_text');
|
391 |
$content['option'] = 'text';
|
392 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
393 |
}
|
394 |
|
395 |
public function renderbuttonBackgroundcolor()
|
396 |
{
|
397 |
+
global $gdpr;
|
398 |
+
$content['value'] = $gdpr->Options->get('popup_button_background');
|
399 |
$content['option'] = 'button_background';
|
400 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
401 |
}
|
402 |
public function renderbuttonTextcolor()
|
403 |
{
|
404 |
+
global $gdpr;
|
405 |
+
$content['value'] = $gdpr->Options->get('popup_button_text');
|
406 |
$content['option'] = 'button_text';
|
407 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
408 |
}
|
409 |
|
410 |
public function renderborderTextcolor()
|
411 |
{
|
412 |
+
global $gdpr;
|
413 |
+
$content['value'] = $gdpr->Options->get('popup_border_text');
|
414 |
$content['option'] = 'border_text';
|
415 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
416 |
}
|
417 |
|
418 |
public function renderPrivacyToolsPageSelector()
|
419 |
{
|
420 |
+
global $gdpr;
|
421 |
wp_dropdown_pages([
|
422 |
'name' => 'gdpr_tools_page',
|
423 |
'show_option_none' => _x('— Select —', '(Admin)', 'gdpr-framework'),
|
424 |
'option_none_value' => '0',
|
425 |
+
'selected' => $gdpr->Options->get('tools_page'),
|
426 |
'class' => 'js-gdpr-select2 gdpr-select',
|
427 |
'post_status' => 'publish,draft',
|
428 |
]);
|
434 |
*/
|
435 |
public function renderPolicyPageSelector()
|
436 |
{
|
437 |
+
global $gdpr;
|
438 |
wp_dropdown_pages([
|
439 |
'name' => 'gdpr_policy_page',
|
440 |
'show_option_none' => _x('— Select —', '(Admin)', 'gdpr-framework'),
|
441 |
'option_none_value' => '0',
|
442 |
+
'selected' => $gdpr->Options->get('policy_page'),
|
443 |
'class' => 'js-gdpr-select2 gdpr-select',
|
444 |
'post_status' => 'publish,draft',
|
445 |
]);
|
448 |
|
449 |
public function renderPolicyCustomPageSelector()
|
450 |
{
|
451 |
+
global $gdpr;
|
452 |
+
$content = $gdpr->Options->get('custom_policy_page');
|
453 |
echo gdpr('view')->render('admin/general/custom-policy-url', compact('content'));
|
454 |
}
|
455 |
|
456 |
public function renderToolsCustomPageSelector()
|
457 |
{
|
458 |
+
global $gdpr;
|
459 |
+
$content = $gdpr->Options->get('custom_tools_page');
|
460 |
echo gdpr('view')->render('admin/general/custom-tools-url', compact('content'));
|
461 |
}
|
462 |
|
463 |
public function renderTermsPageSelector()
|
464 |
{
|
465 |
+
global $gdpr;
|
466 |
wp_dropdown_pages([
|
467 |
'name' => 'gdpr_terms_page',
|
468 |
'show_option_none' => _x('— Select —', '(Admin)', 'gdpr-framework'),
|
469 |
'option_none_value' => '0',
|
470 |
+
'selected' => $gdpr->Options->get('terms_page'),
|
471 |
'class' => 'js-gdpr-select2 gdpr-select',
|
472 |
'post_status' => 'publish,draft',
|
473 |
]);
|
476 |
|
477 |
public function renderCustomTermsPageSelector()
|
478 |
{
|
479 |
+
global $gdpr;
|
480 |
+
$content = $gdpr->Options->get('custom_terms_page');
|
481 |
echo gdpr('view')->render('admin/general/custom-terms-url', compact('content'));
|
482 |
}
|
483 |
|
484 |
public function renderExportActionSelector()
|
485 |
{
|
486 |
+
global $gdpr;
|
487 |
+
$exportAction = $gdpr->Options->get('export_action');
|
488 |
echo gdpr('view')->render('admin/general/export-action', compact('exportAction'));
|
489 |
echo gdpr('view')->render('admin/general/description-export-action');
|
490 |
}
|
491 |
public function renderPopupThemeSelector()
|
492 |
{
|
493 |
+
global $gdpr;
|
494 |
+
$themeAction = $gdpr->Options->get('popup_theme');
|
495 |
echo gdpr('view')->render('admin/general/theme-action', compact('themeAction'));
|
496 |
echo gdpr('view')->render('admin/general/description-theme-action');
|
497 |
}
|
498 |
public function renderPopupPositionSelector()
|
499 |
{
|
500 |
+
global $gdpr;
|
501 |
+
$positionAction = $gdpr->Options->get('popup_position');
|
502 |
echo gdpr('view')->render('admin/general/position-action', compact('positionAction'));
|
503 |
echo gdpr('view')->render('admin/general/description-position-action');
|
504 |
}
|
505 |
|
506 |
public function renderExportActionEmail()
|
507 |
{
|
508 |
+
global $gdpr;
|
509 |
+
$exportActionEmail = $gdpr->Options->get('export_action_email');
|
510 |
echo gdpr('view')->render('admin/general/export-action-email', compact('exportActionEmail'));
|
511 |
}
|
512 |
|
513 |
public function renderDeleteActionSelector()
|
514 |
{
|
515 |
+
global $gdpr;
|
516 |
+
$deleteAction = $gdpr->Options->get('delete_action');
|
517 |
echo gdpr('view')->render('admin/general/delete-action', compact('deleteAction'));
|
518 |
echo gdpr('view')->render('admin/general/description-delete-action');
|
519 |
}
|
520 |
|
521 |
public function renderDeleteActionReassign()
|
522 |
{
|
523 |
+
global $gdpr;
|
524 |
+
$reassign = $gdpr->Options->get('delete_action_reassign');
|
525 |
echo gdpr('view')->render('admin/general/delete-action-reassign', compact('reassign'));
|
526 |
}
|
527 |
|
528 |
public function renderDeleteActionReassignUser()
|
529 |
{
|
530 |
+
global $gdpr;
|
531 |
wp_dropdown_users([
|
532 |
'name' => 'gdpr_delete_action_reassign_user',
|
533 |
'show_option_none' => _x('— Select —', '(Admin)', 'gdpr-framework'),
|
534 |
'option_none_value' => '0',
|
535 |
+
'selected' => $gdpr->Options->get('delete_action_reassign_user'),
|
536 |
'class' => 'js-gdpr-select2 gdpr-select',
|
537 |
'role__in' => apply_filters('gdpr/options/reassign/roles', ['administrator', 'editor']),
|
538 |
]);
|
540 |
|
541 |
public function renderDeleteActionEmail()
|
542 |
{
|
543 |
+
global $gdpr;
|
544 |
+
$deleteActionEmail = $gdpr->Options->get('delete_action_email');
|
545 |
echo gdpr('view')->render('admin/general/delete-action-email', compact('deleteActionEmail'));
|
546 |
}
|
547 |
|
548 |
public function renderStylesheetSelector()
|
549 |
{
|
550 |
+
global $gdpr;
|
551 |
+
$enabled = $gdpr->Options->get('enable_stylesheet');
|
552 |
echo gdpr('view')->render('admin/general/stylesheet', compact('enabled'));
|
553 |
}
|
554 |
|
555 |
public function renderThemeCompatibilitySelector()
|
556 |
{
|
557 |
+
global $gdpr;
|
558 |
+
$enabled = $gdpr->Options->get('enable_theme_compatibility');
|
559 |
echo gdpr('view')->render('admin/general/theme-compatibility', compact('enabled'));
|
560 |
}
|
561 |
|
562 |
public function renderwooCompatibilitySelector()
|
563 |
{
|
564 |
+
global $gdpr;
|
565 |
+
$enabled = $gdpr->Options->get('enable_woo_compatibility');
|
566 |
echo gdpr('view')->render('admin/general/woo-compatibility', compact('enabled'));
|
567 |
}
|
568 |
public function renderwoodisablewooSelector()
|
569 |
{
|
570 |
+
global $gdpr;
|
571 |
+
$enabled = $gdpr->Options->get('disable_checkbox_woo_compatibility');
|
572 |
echo gdpr('view')->render('admin/general/woo-disable_checkbox', compact('enabled'));
|
573 |
}
|
574 |
public function renderwooregisterdisablewooSelector()
|
575 |
{
|
576 |
+
global $gdpr;
|
577 |
+
$enabled = $gdpr->Options->get('disable_register_checkbox_woo_compatibility');
|
578 |
echo gdpr('view')->render('admin/general/woo-disable_register_checkbox', compact('enabled'));
|
579 |
}
|
580 |
public function rendereddCompatibilitySelector()
|
581 |
+
{
|
582 |
+
global $gdpr;
|
583 |
+
$enabled = $gdpr->Options->get('enable_edd_compatibility');
|
584 |
echo gdpr('view')->render('admin/general/edd-compatibility', compact('enabled'));
|
585 |
}
|
586 |
}
|
src/Admin/Modal.php
CHANGED
@@ -11,8 +11,6 @@ class Modal
|
|
11 |
protected $data;
|
12 |
|
13 |
/**
|
14 |
-
* todo: replace with a proper factory pattern via gdpr()?
|
15 |
-
*
|
16 |
* AdminNotice constructor.
|
17 |
*/
|
18 |
public function __construct()
|
@@ -31,7 +29,7 @@ class Modal
|
|
31 |
public function render()
|
32 |
{
|
33 |
if (!$this->template) {
|
34 |
-
|
35 |
}
|
36 |
|
37 |
echo gdpr('view')->render('admin/modals/header', $this->data);
|
11 |
protected $data;
|
12 |
|
13 |
/**
|
|
|
|
|
14 |
* AdminNotice constructor.
|
15 |
*/
|
16 |
public function __construct()
|
29 |
public function render()
|
30 |
{
|
31 |
if (!$this->template) {
|
32 |
+
return;
|
33 |
}
|
34 |
|
35 |
echo gdpr('view')->render('admin/modals/header', $this->data);
|
src/Admin/WordpressAdmin.php
CHANGED
@@ -15,12 +15,9 @@ class WordpressAdmin
|
|
15 |
{
|
16 |
$this->adminPage = $adminPage;
|
17 |
|
18 |
-
// Register the AdminTabGeneral class in our container
|
19 |
-
gdpr()->bind(AdminTabGeneral::class);
|
20 |
-
|
21 |
// Allow turning off helpers
|
22 |
if (apply_filters('gdpr/admin/helpers/enabled', true)) {
|
23 |
-
|
24 |
}
|
25 |
|
26 |
$this->setup();
|
@@ -81,7 +78,8 @@ class WordpressAdmin
|
|
81 |
*/
|
82 |
public function registerAdminTabGeneral($tabs)
|
83 |
{
|
84 |
-
$
|
|
|
85 |
|
86 |
return $tabs;
|
87 |
}
|
@@ -91,12 +89,13 @@ class WordpressAdmin
|
|
91 |
*/
|
92 |
public function enqueue()
|
93 |
{
|
|
|
94 |
/**
|
95 |
* General admin styles
|
96 |
*/
|
97 |
wp_enqueue_style(
|
98 |
'gdpr-admin',
|
99 |
-
gdpr
|
100 |
);
|
101 |
|
102 |
|
@@ -109,7 +108,7 @@ class WordpressAdmin
|
|
109 |
wp_enqueue_style('wp-jquery-ui-dialog');
|
110 |
wp_enqueue_script(
|
111 |
'gdpr-admin',
|
112 |
-
gdpr
|
113 |
['jquery-ui-dialog']
|
114 |
);
|
115 |
|
@@ -118,7 +117,7 @@ class WordpressAdmin
|
|
118 |
*/
|
119 |
wp_enqueue_script(
|
120 |
'jquery-repeater',
|
121 |
-
gdpr
|
122 |
['jquery']
|
123 |
);
|
124 |
|
@@ -131,25 +130,25 @@ class WordpressAdmin
|
|
131 |
|
132 |
wp_enqueue_style(
|
133 |
'select2css',
|
134 |
-
gdpr
|
135 |
);
|
136 |
|
137 |
wp_enqueue_script(
|
138 |
'select2',
|
139 |
-
gdpr
|
140 |
['jquery']
|
141 |
);
|
142 |
|
143 |
wp_enqueue_script(
|
144 |
'conditional-show',
|
145 |
-
gdpr
|
146 |
['jquery']
|
147 |
);
|
148 |
/**
|
149 |
* Color Picker
|
150 |
*/
|
151 |
-
wp_enqueue_script( 'iris'
|
152 |
-
wp_enqueue_script( 'iris-init'
|
153 |
}
|
154 |
}
|
155 |
|
@@ -158,11 +157,12 @@ class WordpressAdmin
|
|
158 |
*/
|
159 |
public function registerPostStates($postStates, $post)
|
160 |
{
|
161 |
-
|
|
|
162 |
$postStates['gdpr_policy_page'] = _x('Privacy Policy Page', '(Admin)', 'gdpr-framework');
|
163 |
}
|
164 |
|
165 |
-
if (gdpr
|
166 |
$postStates['gdpr_tools_page'] = _x('Privacy Tools Page', '(Admin)', 'gdpr-framework');
|
167 |
}
|
168 |
|
15 |
{
|
16 |
$this->adminPage = $adminPage;
|
17 |
|
|
|
|
|
|
|
18 |
// Allow turning off helpers
|
19 |
if (apply_filters('gdpr/admin/helpers/enabled', true)) {
|
20 |
+
new AdminHelper();
|
21 |
}
|
22 |
|
23 |
$this->setup();
|
78 |
*/
|
79 |
public function registerAdminTabGeneral($tabs)
|
80 |
{
|
81 |
+
global $gdpr;
|
82 |
+
$tabs['general'] = $gdpr->AdminTabGeneral;
|
83 |
|
84 |
return $tabs;
|
85 |
}
|
89 |
*/
|
90 |
public function enqueue()
|
91 |
{
|
92 |
+
global $gdpr;
|
93 |
/**
|
94 |
* General admin styles
|
95 |
*/
|
96 |
wp_enqueue_style(
|
97 |
'gdpr-admin',
|
98 |
+
$gdpr->PluginUrl . 'assets/gdpr-admin.css'
|
99 |
);
|
100 |
|
101 |
|
108 |
wp_enqueue_style('wp-jquery-ui-dialog');
|
109 |
wp_enqueue_script(
|
110 |
'gdpr-admin',
|
111 |
+
$gdpr->PluginUrl . 'assets/gdpr-admin.js',
|
112 |
['jquery-ui-dialog']
|
113 |
);
|
114 |
|
117 |
*/
|
118 |
wp_enqueue_script(
|
119 |
'jquery-repeater',
|
120 |
+
$gdpr->PluginUrl . 'assets/jquery.repeater.min.js',
|
121 |
['jquery']
|
122 |
);
|
123 |
|
130 |
|
131 |
wp_enqueue_style(
|
132 |
'select2css',
|
133 |
+
$gdpr->PluginUrl . 'assets/select2-4.0.5.css'
|
134 |
);
|
135 |
|
136 |
wp_enqueue_script(
|
137 |
'select2',
|
138 |
+
$gdpr->PluginUrl . 'assets/select2-4.0.3.js',
|
139 |
['jquery']
|
140 |
);
|
141 |
|
142 |
wp_enqueue_script(
|
143 |
'conditional-show',
|
144 |
+
$gdpr->PluginUrl . 'assets/conditional-show.js',
|
145 |
['jquery']
|
146 |
);
|
147 |
/**
|
148 |
* Color Picker
|
149 |
*/
|
150 |
+
wp_enqueue_script( 'iris',$gdpr->PluginUrl .'assets/iris.min.js' );
|
151 |
+
wp_enqueue_script( 'iris-init',$gdpr->PluginUrl .'assets/iris-init.js' );
|
152 |
}
|
153 |
}
|
154 |
|
157 |
*/
|
158 |
public function registerPostStates($postStates, $post)
|
159 |
{
|
160 |
+
global $gdpr;
|
161 |
+
if ($gdpr->Options->get('policy_page') == $post->ID) {
|
162 |
$postStates['gdpr_policy_page'] = _x('Privacy Policy Page', '(Admin)', 'gdpr-framework');
|
163 |
}
|
164 |
|
165 |
+
if ($gdpr->Options->get('tools_page') == $post->ID) {
|
166 |
$postStates['gdpr_tools_page'] = _x('Privacy Tools Page', '(Admin)', 'gdpr-framework');
|
167 |
}
|
168 |
|
src/Admin/WordpressAdminPage.php
CHANGED
@@ -25,14 +25,8 @@ class WordpressAdminPage
|
|
25 |
// Register the tabs
|
26 |
add_action('admin_init', [$this, 'registerTabs']);
|
27 |
|
28 |
-
//
|
29 |
-
|
30 |
-
// Initialize the active tab
|
31 |
-
add_action('admin_init', [$this, 'initActiveTab']);
|
32 |
-
//}
|
33 |
-
|
34 |
-
// todo
|
35 |
-
// gdpr('admin-modal')->add('gdpr-test', 'admin/modals/test', ['title' => 'Test modal']);
|
36 |
}
|
37 |
|
38 |
/**
|
@@ -133,10 +127,7 @@ class WordpressAdminPage
|
|
133 |
return $navigation;
|
134 |
}
|
135 |
|
136 |
-
|
137 |
/**
|
138 |
-
* todo: move to helper?
|
139 |
-
*
|
140 |
* @param $slug
|
141 |
* @return string
|
142 |
*/
|
25 |
// Register the tabs
|
26 |
add_action('admin_init', [$this, 'registerTabs']);
|
27 |
|
28 |
+
// Initialize the active tab
|
29 |
+
add_action('admin_init', [$this, 'initActiveTab']);
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
}
|
31 |
|
32 |
/**
|
127 |
return $navigation;
|
128 |
}
|
129 |
|
|
|
130 |
/**
|
|
|
|
|
131 |
* @param $slug
|
132 |
* @return string
|
133 |
*/
|
src/Components/AdvancedIntegration/AdvancedIntegration.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
namespace Codelight\GDPR\Components\AdvancedIntegration;
|
|
|
4 |
/**
|
5 |
* Handles putting together and rendering the privacy policy page
|
6 |
*
|
@@ -17,7 +18,7 @@ class AdvancedIntegration
|
|
17 |
|
18 |
public function registerAdminTab($tabs)
|
19 |
{
|
20 |
-
$tabs['advanced-integration'] =
|
21 |
return $tabs;
|
22 |
}
|
23 |
}
|
1 |
<?php
|
2 |
|
3 |
namespace Codelight\GDPR\Components\AdvancedIntegration;
|
4 |
+
|
5 |
/**
|
6 |
* Handles putting together and rendering the privacy policy page
|
7 |
*
|
18 |
|
19 |
public function registerAdminTab($tabs)
|
20 |
{
|
21 |
+
$tabs['advanced-integration'] = new AdminTabAdvancedIntegration();
|
22 |
return $tabs;
|
23 |
}
|
24 |
}
|
src/Components/Consent/AdminTabConsent.php
CHANGED
@@ -68,8 +68,8 @@ class AdminTabConsent extends AdminTab
|
|
68 |
*/
|
69 |
public function renderConsentForm()
|
70 |
{
|
71 |
-
|
72 |
-
$consentInfo = gdpr
|
73 |
|
74 |
if (is_null($consentInfo)) {
|
75 |
$consentInfo = $this->getDefaultConsentInfo();
|
@@ -81,7 +81,6 @@ class AdminTabConsent extends AdminTab
|
|
81 |
$defaultConsentTypes = $this->consentManager->getDefaultConsentTypes();
|
82 |
$customConsentTypes = $this->consentManager->getCustomConsentTypes();
|
83 |
|
84 |
-
// todo: move to a filter
|
85 |
if (defined('ICL_LANGUAGE_CODE')) {
|
86 |
$prefix = ICL_LANGUAGE_CODE . '_';
|
87 |
} else {
|
@@ -96,9 +95,10 @@ class AdminTabConsent extends AdminTab
|
|
96 |
*/
|
97 |
public function updateConsentData()
|
98 |
{
|
|
|
99 |
// Update additional information
|
100 |
if (isset($_POST['gdpr_consent_info'])) {
|
101 |
-
gdpr
|
102 |
}
|
103 |
|
104 |
// Update consent types
|
68 |
*/
|
69 |
public function renderConsentForm()
|
70 |
{
|
71 |
+
global $gdpr;
|
72 |
+
$consentInfo = $gdpr->Options->get('consent_info');
|
73 |
|
74 |
if (is_null($consentInfo)) {
|
75 |
$consentInfo = $this->getDefaultConsentInfo();
|
81 |
$defaultConsentTypes = $this->consentManager->getDefaultConsentTypes();
|
82 |
$customConsentTypes = $this->consentManager->getCustomConsentTypes();
|
83 |
|
|
|
84 |
if (defined('ICL_LANGUAGE_CODE')) {
|
85 |
$prefix = ICL_LANGUAGE_CODE . '_';
|
86 |
} else {
|
95 |
*/
|
96 |
public function updateConsentData()
|
97 |
{
|
98 |
+
global $gdpr;
|
99 |
// Update additional information
|
100 |
if (isset($_POST['gdpr_consent_info'])) {
|
101 |
+
$gdpr->Options->set('consent_info', wp_unslash($_POST['gdpr_consent_info']));
|
102 |
}
|
103 |
|
104 |
// Update consent types
|
src/Components/Consent/ConsentAdmin.php
CHANGED
@@ -6,14 +6,13 @@ class ConsentAdmin
|
|
6 |
{
|
7 |
public function __construct()
|
8 |
{
|
9 |
-
gdpr()->bind(AdminTabConsent::class);
|
10 |
-
|
11 |
add_filter('gdpr/admin/tabs', [$this, 'registerAdminTab'], 20);
|
12 |
}
|
13 |
|
14 |
public function registerAdminTab($tabs)
|
15 |
{
|
16 |
-
$
|
|
|
17 |
|
18 |
return $tabs;
|
19 |
}
|
6 |
{
|
7 |
public function __construct()
|
8 |
{
|
|
|
|
|
9 |
add_filter('gdpr/admin/tabs', [$this, 'registerAdminTab'], 20);
|
10 |
}
|
11 |
|
12 |
public function registerAdminTab($tabs)
|
13 |
{
|
14 |
+
global $gdpr;
|
15 |
+
$tabs['consent'] = new AdminTabConsent($gdpr->Consent);
|
16 |
|
17 |
return $tabs;
|
18 |
}
|
src/Components/Consent/ConsentManager.php
CHANGED
@@ -38,16 +38,18 @@ class ConsentManager
|
|
38 |
}
|
39 |
|
40 |
public function registerDefaultConsentTypes()
|
41 |
-
{
|
|
|
|
|
42 |
/****
|
43 |
* privacy-policy default consent
|
44 |
*/
|
45 |
-
$policyPageUrl = get_permalink(gdpr
|
46 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
47 |
|
48 |
$policyPageUrl = apply_filters( 'gdpr_custom_policy_link',$policyPageUrl);
|
49 |
|
50 |
-
gdpr
|
51 |
'privacy-policy',
|
52 |
sprintf(
|
53 |
__('I accept the %sPrivacy Policy%s', 'gdpr-framework'),
|
@@ -60,7 +62,7 @@ class ConsentManager
|
|
60 |
/****
|
61 |
* terms-conditions default consent
|
62 |
*/
|
63 |
-
$termsPage = gdpr
|
64 |
if ($termsPage) {
|
65 |
$termsPageUrl = get_permalink($termsPage);
|
66 |
} else {
|
@@ -68,7 +70,7 @@ class ConsentManager
|
|
68 |
}
|
69 |
|
70 |
if ($termsPageUrl) {
|
71 |
-
gdpr
|
72 |
'terms-conditions',
|
73 |
sprintf(
|
74 |
__('I accept the %sTerms & Conditions%s', 'gdpr-framework'),
|
@@ -83,7 +85,7 @@ class ConsentManager
|
|
83 |
* Woocommerce Policy consent
|
84 |
*/
|
85 |
if ( class_exists( 'WooCommerce' ) ) {
|
86 |
-
gdpr
|
87 |
'gdpr_woo_consent', _x('Woocommerce Policy Consent', '(Admin)', 'gdpr-framework'),
|
88 |
_x('This consent is visible by default on woocommerce checkout page. If someone wishes to withdraw it, they should simply request to delete all their data.', '(Admin)', 'gdpr-framework'),
|
89 |
true
|
@@ -141,7 +143,9 @@ class ConsentManager
|
|
141 |
*/
|
142 |
public function registerCustomConsentTypes()
|
143 |
{
|
144 |
-
$
|
|
|
|
|
145 |
|
146 |
if (is_array($savedConsentTypes) && count($savedConsentTypes))
|
147 |
{
|
@@ -167,8 +171,9 @@ class ConsentManager
|
|
167 |
*/
|
168 |
public function saveCustomConsentTypes($consentTypes)
|
169 |
{
|
170 |
-
|
171 |
-
|
|
|
172 |
}
|
173 |
|
174 |
/**
|
38 |
}
|
39 |
|
40 |
public function registerDefaultConsentTypes()
|
41 |
+
{
|
42 |
+
global $gdpr;
|
43 |
+
|
44 |
/****
|
45 |
* privacy-policy default consent
|
46 |
*/
|
47 |
+
$policyPageUrl = get_permalink($gdpr->Options->get('policy_page'));
|
48 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
49 |
|
50 |
$policyPageUrl = apply_filters( 'gdpr_custom_policy_link',$policyPageUrl);
|
51 |
|
52 |
+
$gdpr->Consent->register(
|
53 |
'privacy-policy',
|
54 |
sprintf(
|
55 |
__('I accept the %sPrivacy Policy%s', 'gdpr-framework'),
|
62 |
/****
|
63 |
* terms-conditions default consent
|
64 |
*/
|
65 |
+
$termsPage = $gdpr->Options->get('terms_page');
|
66 |
if ($termsPage) {
|
67 |
$termsPageUrl = get_permalink($termsPage);
|
68 |
} else {
|
70 |
}
|
71 |
|
72 |
if ($termsPageUrl) {
|
73 |
+
$gdpr->Consent->register(
|
74 |
'terms-conditions',
|
75 |
sprintf(
|
76 |
__('I accept the %sTerms & Conditions%s', 'gdpr-framework'),
|
85 |
* Woocommerce Policy consent
|
86 |
*/
|
87 |
if ( class_exists( 'WooCommerce' ) ) {
|
88 |
+
$gdpr->Consent->register(
|
89 |
'gdpr_woo_consent', _x('Woocommerce Policy Consent', '(Admin)', 'gdpr-framework'),
|
90 |
_x('This consent is visible by default on woocommerce checkout page. If someone wishes to withdraw it, they should simply request to delete all their data.', '(Admin)', 'gdpr-framework'),
|
91 |
true
|
143 |
*/
|
144 |
public function registerCustomConsentTypes()
|
145 |
{
|
146 |
+
global $gdpr;
|
147 |
+
|
148 |
+
$savedConsentTypes = $gdpr->Options->get('consent_types');
|
149 |
|
150 |
if (is_array($savedConsentTypes) && count($savedConsentTypes))
|
151 |
{
|
171 |
*/
|
172 |
public function saveCustomConsentTypes($consentTypes)
|
173 |
{
|
174 |
+
global $gdpr;
|
175 |
+
|
176 |
+
$gdpr->Options->set('consent_types', $consentTypes);
|
177 |
}
|
178 |
|
179 |
/**
|
src/Components/CookiePopup/AdminTabCookiePopup.php
CHANGED
@@ -165,123 +165,145 @@ class AdminTabCookiePopup extends AdminTab
|
|
165 |
}
|
166 |
public function renderEnableCheckbox()
|
167 |
{
|
168 |
-
$
|
|
|
169 |
echo gdpr('view')->render('admin/general/enable', compact('enabled'));
|
170 |
}
|
171 |
|
172 |
public function renderEnableCheckboxtac()
|
173 |
{
|
174 |
-
$
|
|
|
175 |
echo gdpr('view')->render('admin/general/enable-tac', compact('enabled'));
|
176 |
}
|
177 |
public function renderCommentCheckbox()
|
178 |
{
|
|
|
179 |
$content['option_name'] = 'comment_checkbox';
|
180 |
-
$content['value'] = gdpr
|
181 |
$content['option'] = _x('Disable Checkbox For Comments', '(Admin)', 'gdpr-framework');
|
182 |
echo gdpr('view')->render('admin/general/disble-checkbox', compact('content'));
|
183 |
}
|
184 |
public function renderRegisterCheckbox()
|
185 |
-
{
|
|
|
186 |
$content['option_name'] = 'register_checkbox';
|
187 |
-
$content['value'] = gdpr
|
188 |
$content['option'] = _x('Disable Checkbox For Register Form', '(Admin)', 'gdpr-framework');
|
189 |
echo gdpr('view')->render('admin/general/disble-checkbox', compact('content'));
|
190 |
}
|
191 |
public function renderEnableCheckboxpopup()
|
192 |
{
|
193 |
-
$
|
|
|
194 |
echo gdpr('view')->render('admin/general/enable-popup', compact('enabled'));
|
195 |
}
|
196 |
public function renderEnableOneTimeCheckboxpopup()
|
197 |
{
|
198 |
-
$
|
|
|
199 |
echo gdpr('view')->render('admin/general/enable-onetime-popup', compact('enabled'));
|
200 |
}
|
201 |
public function renderEnablePolicyOnPopup()
|
202 |
{
|
203 |
-
$
|
|
|
204 |
echo gdpr('view')->render('admin/general/enable-policy-popup', compact('enabled'));
|
205 |
}
|
206 |
public function renderheaderCheckboxpopup()
|
207 |
{
|
208 |
-
$
|
|
|
209 |
echo gdpr('view')->render('admin/general/enable_popup_header', compact('content'));
|
210 |
}
|
211 |
public function rendercontentCheckboxpopup()
|
212 |
{
|
213 |
-
$
|
|
|
214 |
echo gdpr('view')->render('admin/general/enable_popup_content', compact('content'));
|
215 |
}
|
216 |
public function renderNameFrom()
|
217 |
{
|
218 |
-
$
|
|
|
219 |
echo gdpr('view')->render('admin/general/name_from', compact('content'));
|
220 |
}
|
221 |
public function renderEmailFrom()
|
222 |
{
|
223 |
-
$
|
|
|
224 |
echo gdpr('view')->render('admin/general/email_from', compact('content'));
|
225 |
}
|
226 |
public function renderAllowContentPopup()
|
227 |
{
|
228 |
-
$
|
|
|
229 |
echo gdpr('view')->render('admin/general/enable_popup_allow_content', compact('content'));
|
230 |
}
|
231 |
public function renderDismissContentPopup()
|
232 |
{
|
233 |
-
$
|
|
|
234 |
echo gdpr('view')->render('admin/general/enable_popup_dismiss_content', compact('content'));
|
235 |
}
|
236 |
public function renderlearnmorePopup()
|
237 |
{
|
238 |
-
$
|
|
|
239 |
echo gdpr('view')->render('admin/general/enable_popup_learnmore_content', compact('content'));
|
240 |
}
|
241 |
public function renderpopupBackgroundcolor()
|
242 |
{
|
243 |
-
$
|
|
|
244 |
$content['option'] = 'background';
|
245 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
246 |
}
|
247 |
public function renderpopupTextcolor()
|
248 |
{
|
249 |
-
$
|
|
|
250 |
$content['option'] = 'text';
|
251 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
252 |
}
|
253 |
public function renderpopuplinktarget()
|
254 |
{
|
255 |
-
$
|
|
|
256 |
echo gdpr('view')->render('admin/general/popup_link_target', compact('content'));
|
257 |
}
|
258 |
public function renderbuttonBackgroundcolor()
|
259 |
{
|
260 |
-
$
|
|
|
261 |
$content['option'] = 'button_background';
|
262 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
263 |
}
|
264 |
public function renderbuttonTextcolor()
|
265 |
{
|
266 |
-
$
|
|
|
267 |
$content['option'] = 'button_text';
|
268 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
269 |
}
|
270 |
public function renderborderTextcolor()
|
271 |
{
|
272 |
-
$
|
|
|
273 |
$content['option'] = 'border_text';
|
274 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
275 |
}
|
276 |
public function renderPopupPositionSelector()
|
277 |
{
|
278 |
-
$
|
|
|
279 |
echo gdpr('view')->render('admin/general/position-action', compact('positionAction'));
|
280 |
echo gdpr('view')->render('admin/general/description-position-action');
|
281 |
}
|
282 |
public function renderPopupThemeSelector()
|
283 |
{
|
284 |
-
$
|
|
|
285 |
echo gdpr('view')->render('admin/general/theme-action', compact('themeAction'));
|
286 |
echo gdpr('view')->render('admin/general/description-theme-action');
|
287 |
}
|
165 |
}
|
166 |
public function renderEnableCheckbox()
|
167 |
{
|
168 |
+
global $gdpr;
|
169 |
+
$enabled = $gdpr->Options->get('enable');
|
170 |
echo gdpr('view')->render('admin/general/enable', compact('enabled'));
|
171 |
}
|
172 |
|
173 |
public function renderEnableCheckboxtac()
|
174 |
{
|
175 |
+
global $gdpr;
|
176 |
+
$enabled = $gdpr->Options->get('enable_tac');
|
177 |
echo gdpr('view')->render('admin/general/enable-tac', compact('enabled'));
|
178 |
}
|
179 |
public function renderCommentCheckbox()
|
180 |
{
|
181 |
+
global $gdpr;
|
182 |
$content['option_name'] = 'comment_checkbox';
|
183 |
+
$content['value'] = $gdpr->Options->get('comment_checkbox');
|
184 |
$content['option'] = _x('Disable Checkbox For Comments', '(Admin)', 'gdpr-framework');
|
185 |
echo gdpr('view')->render('admin/general/disble-checkbox', compact('content'));
|
186 |
}
|
187 |
public function renderRegisterCheckbox()
|
188 |
+
{
|
189 |
+
global $gdpr;
|
190 |
$content['option_name'] = 'register_checkbox';
|
191 |
+
$content['value'] = $gdpr->Options->get('register_checkbox');
|
192 |
$content['option'] = _x('Disable Checkbox For Register Form', '(Admin)', 'gdpr-framework');
|
193 |
echo gdpr('view')->render('admin/general/disble-checkbox', compact('content'));
|
194 |
}
|
195 |
public function renderEnableCheckboxpopup()
|
196 |
{
|
197 |
+
global $gdpr;
|
198 |
+
$enabled = $gdpr->Options->get('enable_popup');
|
199 |
echo gdpr('view')->render('admin/general/enable-popup', compact('enabled'));
|
200 |
}
|
201 |
public function renderEnableOneTimeCheckboxpopup()
|
202 |
{
|
203 |
+
global $gdpr;
|
204 |
+
$enabled = $gdpr->Options->get('onetime_popup');
|
205 |
echo gdpr('view')->render('admin/general/enable-onetime-popup', compact('enabled'));
|
206 |
}
|
207 |
public function renderEnablePolicyOnPopup()
|
208 |
{
|
209 |
+
global $gdpr;
|
210 |
+
$enabled = $gdpr->Options->get('policy_popup');
|
211 |
echo gdpr('view')->render('admin/general/enable-policy-popup', compact('enabled'));
|
212 |
}
|
213 |
public function renderheaderCheckboxpopup()
|
214 |
{
|
215 |
+
global $gdpr;
|
216 |
+
$content = $gdpr->Options->get('header');
|
217 |
echo gdpr('view')->render('admin/general/enable_popup_header', compact('content'));
|
218 |
}
|
219 |
public function rendercontentCheckboxpopup()
|
220 |
{
|
221 |
+
global $gdpr;
|
222 |
+
$content = $gdpr->Options->get('popup_content');
|
223 |
echo gdpr('view')->render('admin/general/enable_popup_content', compact('content'));
|
224 |
}
|
225 |
public function renderNameFrom()
|
226 |
{
|
227 |
+
global $gdpr;
|
228 |
+
$content = $gdpr->Options->get('name_from');
|
229 |
echo gdpr('view')->render('admin/general/name_from', compact('content'));
|
230 |
}
|
231 |
public function renderEmailFrom()
|
232 |
{
|
233 |
+
global $gdpr;
|
234 |
+
$content = $gdpr->Options->get('email_from');
|
235 |
echo gdpr('view')->render('admin/general/email_from', compact('content'));
|
236 |
}
|
237 |
public function renderAllowContentPopup()
|
238 |
{
|
239 |
+
global $gdpr;
|
240 |
+
$content = $gdpr->Options->get('popup_allow_text');
|
241 |
echo gdpr('view')->render('admin/general/enable_popup_allow_content', compact('content'));
|
242 |
}
|
243 |
public function renderDismissContentPopup()
|
244 |
{
|
245 |
+
global $gdpr;
|
246 |
+
$content = $gdpr->Options->get('popup_dismiss_text');
|
247 |
echo gdpr('view')->render('admin/general/enable_popup_dismiss_content', compact('content'));
|
248 |
}
|
249 |
public function renderlearnmorePopup()
|
250 |
{
|
251 |
+
global $gdpr;
|
252 |
+
$content = $gdpr->Options->get('popup_learnmore_text');
|
253 |
echo gdpr('view')->render('admin/general/enable_popup_learnmore_content', compact('content'));
|
254 |
}
|
255 |
public function renderpopupBackgroundcolor()
|
256 |
{
|
257 |
+
global $gdpr;
|
258 |
+
$content['value'] = $gdpr->Options->get('popup_background');
|
259 |
$content['option'] = 'background';
|
260 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
261 |
}
|
262 |
public function renderpopupTextcolor()
|
263 |
{
|
264 |
+
global $gdpr;
|
265 |
+
$content['value'] = $gdpr->Options->get('popup_text');
|
266 |
$content['option'] = 'text';
|
267 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
268 |
}
|
269 |
public function renderpopuplinktarget()
|
270 |
{
|
271 |
+
global $gdpr;
|
272 |
+
$content = $gdpr->Options->get('popup_link_target');
|
273 |
echo gdpr('view')->render('admin/general/popup_link_target', compact('content'));
|
274 |
}
|
275 |
public function renderbuttonBackgroundcolor()
|
276 |
{
|
277 |
+
global $gdpr;
|
278 |
+
$content['value'] = $gdpr->Options->get('popup_button_background');
|
279 |
$content['option'] = 'button_background';
|
280 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
281 |
}
|
282 |
public function renderbuttonTextcolor()
|
283 |
{
|
284 |
+
global $gdpr;
|
285 |
+
$content['value'] = $gdpr->Options->get('popup_button_text');
|
286 |
$content['option'] = 'button_text';
|
287 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
288 |
}
|
289 |
public function renderborderTextcolor()
|
290 |
{
|
291 |
+
global $gdpr;
|
292 |
+
$content['value'] = $gdpr->Options->get('popup_border_text');
|
293 |
$content['option'] = 'border_text';
|
294 |
echo gdpr('view')->render('admin/general/popup_background_color_picker', compact('content'));
|
295 |
}
|
296 |
public function renderPopupPositionSelector()
|
297 |
{
|
298 |
+
global $gdpr;
|
299 |
+
$positionAction = $gdpr->Options->get('popup_position');
|
300 |
echo gdpr('view')->render('admin/general/position-action', compact('positionAction'));
|
301 |
echo gdpr('view')->render('admin/general/description-position-action');
|
302 |
}
|
303 |
public function renderPopupThemeSelector()
|
304 |
{
|
305 |
+
global $gdpr;
|
306 |
+
$themeAction = $gdpr->Options->get('popup_theme');
|
307 |
echo gdpr('view')->render('admin/general/theme-action', compact('themeAction'));
|
308 |
echo gdpr('view')->render('admin/general/description-theme-action');
|
309 |
}
|
src/Components/CookiePopup/CookiePopup.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
namespace Codelight\GDPR\Components\CookiePopup;
|
|
|
4 |
/**
|
5 |
* Handles putting together and rendering the privacy policy page
|
6 |
*
|
@@ -17,7 +18,7 @@ class CookiePopup
|
|
17 |
|
18 |
public function registerAdminTab($tabs)
|
19 |
{
|
20 |
-
$tabs['cookie-popup'] =
|
21 |
return $tabs;
|
22 |
}
|
23 |
}
|
1 |
<?php
|
2 |
|
3 |
namespace Codelight\GDPR\Components\CookiePopup;
|
4 |
+
|
5 |
/**
|
6 |
* Handles putting together and rendering the privacy policy page
|
7 |
*
|
18 |
|
19 |
public function registerAdminTab($tabs)
|
20 |
{
|
21 |
+
$tabs['cookie-popup'] = new AdminTabCookiePopup();
|
22 |
return $tabs;
|
23 |
}
|
24 |
}
|
src/Components/DoNotSell/DoNotSell.php
CHANGED
@@ -9,7 +9,7 @@ class DoNotSell {
|
|
9 |
}
|
10 |
|
11 |
public function registerAdminTab( $tabs ) {
|
12 |
-
$tabs['do-not-sell'] =
|
13 |
return $tabs;
|
14 |
}
|
15 |
}
|
9 |
}
|
10 |
|
11 |
public function registerAdminTab( $tabs ) {
|
12 |
+
$tabs['do-not-sell'] = new AdminTabDoNotSell();
|
13 |
return $tabs;
|
14 |
}
|
15 |
}
|
src/Components/PrivacyManager/PrivacyManager.php
CHANGED
@@ -17,7 +17,7 @@ class PrivacyManager
|
|
17 |
|
18 |
public function registerAdminTab($tabs)
|
19 |
{
|
20 |
-
$tabs['privacy-manager'] =
|
21 |
return $tabs;
|
22 |
}
|
23 |
}
|
17 |
|
18 |
public function registerAdminTab($tabs)
|
19 |
{
|
20 |
+
$tabs['privacy-manager'] = new AdminTabPrivacyManager();
|
21 |
return $tabs;
|
22 |
}
|
23 |
}
|
src/Components/PrivacyPolicy/AdminTabPrivacyPolicy.php
CHANGED
@@ -219,21 +219,24 @@ class AdminTabPrivacyPolicy extends AdminTab
|
|
219 |
|
220 |
public function renderCompanyNameHtml()
|
221 |
{
|
222 |
-
$
|
|
|
223 |
$placeholder = _x('Company Name', '(Admin)', 'gdpr-framework');
|
224 |
echo "<input name='gdpr_company_name' placeholder='{$placeholder}' value='{$value}'>";
|
225 |
}
|
226 |
|
227 |
public function renderCompanyEmailHtml()
|
228 |
{
|
229 |
-
$
|
|
|
230 |
$placeholder = _x('Contact Email', '(Admin)', 'gdpr-framework');
|
231 |
echo "<input type='email' name='gdpr_contact_email' placeholder='{$placeholder}' value='{$value}'>";
|
232 |
}
|
233 |
|
234 |
public function renderCompanyLocationHtml()
|
235 |
{
|
236 |
-
$
|
|
|
237 |
$countrySelectOptions = gdpr('helpers')->getCountrySelectOptions($country);
|
238 |
echo gdpr('view')->render('admin/privacy-policy/company-location', compact('countrySelectOptions'));
|
239 |
}
|
@@ -255,21 +258,24 @@ class AdminTabPrivacyPolicy extends AdminTab
|
|
255 |
|
256 |
public function renderRepresentativeContactName()
|
257 |
{
|
258 |
-
$
|
|
|
259 |
$placeholder = _x('Representative Contact Name', '(Admin)', 'gdpr-framework');
|
260 |
echo "<input name='gdpr_representative_contact_name' placeholder='{$placeholder}' value='{$value}'>";
|
261 |
}
|
262 |
|
263 |
public function renderRepresentativeContactEmail()
|
264 |
{
|
265 |
-
$
|
|
|
266 |
$placeholder = _x('Representative Contact Email', '(Admin)', 'gdpr-framework');
|
267 |
echo "<input type='email' name='gdpr_representative_contact_email' placeholder='{$placeholder}' value='{$value}'>";
|
268 |
}
|
269 |
|
270 |
public function renderRepresentativeContactPhone()
|
271 |
{
|
272 |
-
$
|
|
|
273 |
$placeholder = _x('Representative Contact Phone', '(Admin)', 'gdpr-framework');
|
274 |
echo "<input name='gdpr_representative_contact_phone' placeholder='{$placeholder}' value='{$value}'>";
|
275 |
}
|
@@ -298,21 +304,24 @@ class AdminTabPrivacyPolicy extends AdminTab
|
|
298 |
|
299 |
public function renderDpaWebsite()
|
300 |
{
|
301 |
-
$
|
|
|
302 |
$placeholder = _x('Data Protection Authority Website', '(Admin)', 'gdpr-framework');
|
303 |
echo "<input name='gdpr_dpa_website' id='gdpr_dpa_website' placeholder='{$placeholder}' value='{$value}' data-set='{$value}'>";
|
304 |
}
|
305 |
|
306 |
public function renderDpaEmail()
|
307 |
{
|
308 |
-
$
|
|
|
309 |
$placeholder = _x('Data Protection Authority Email', '(Admin)', 'gdpr-framework');
|
310 |
echo "<input type='email' name='gdpr_dpa_email' id='gdpr_dpa_email' placeholder='{$placeholder}' value='{$value}' data-set='{$value}'>";
|
311 |
}
|
312 |
|
313 |
public function renderDpaPhone()
|
314 |
{
|
315 |
-
$
|
|
|
316 |
$placeholder = _x('Data Protection Authority Phone', '(Admin)', 'gdpr-framework');
|
317 |
echo "<input name='gdpr_dpa_phone' id='gdpr_dpa_phone' placeholder='{$placeholder}' value='{$value}' data-set='{$value}'>";
|
318 |
}
|
@@ -323,36 +332,40 @@ class AdminTabPrivacyPolicy extends AdminTab
|
|
323 |
|
324 |
public function renderHasDPOHtml()
|
325 |
{
|
326 |
-
$
|
|
|
327 |
echo gdpr('view')->render('admin/privacy-policy/has-dpo', compact('hasDPO'));
|
328 |
}
|
329 |
|
330 |
public function renderDPONameHtml()
|
331 |
{
|
332 |
-
$
|
|
|
333 |
$placeholder = _x('DPO Name', '(Admin)', 'gdpr-framework');
|
334 |
echo "<input name='gdpr_dpo_name' placeholder='{$placeholder}' value='{$value}'>";
|
335 |
}
|
336 |
|
337 |
public function renderDPOEmailHtml()
|
338 |
{
|
339 |
-
$
|
|
|
340 |
$placeholder = _x('DPO Email', '(Admin)', 'gdpr-framework');
|
341 |
echo "<input type='email' name='gdpr_dpo_email' placeholder='{$placeholder}' value='{$value}'>";
|
342 |
}
|
343 |
|
344 |
public function renderDeleteTextHtml()
|
345 |
{
|
346 |
-
$
|
|
|
347 |
$placeholder = _x('Delete Text', '(Admin)', 'gdpr-framework');
|
348 |
echo "<input name='gdpr_delete_text' placeholder='{$placeholder}' value='{$value}'>";
|
349 |
}
|
350 |
|
351 |
public function generatePolicy()
|
352 |
{
|
353 |
-
$
|
|
|
354 |
|
355 |
-
// todo: handle errors
|
356 |
if ( ! $policyPage) {
|
357 |
return;
|
358 |
}
|
@@ -383,7 +396,8 @@ class AdminTabPrivacyPolicy extends AdminTab
|
|
383 |
|
384 |
public function renderPolicy()
|
385 |
{
|
386 |
-
$
|
|
|
387 |
if ($policyPageId) {
|
388 |
$policyUrl = get_edit_post_link($policyPageId);
|
389 |
} else {
|
219 |
|
220 |
public function renderCompanyNameHtml()
|
221 |
{
|
222 |
+
global $gdpr;
|
223 |
+
$value = $gdpr->Options->get('company_name') ? esc_attr($gdpr->Options->get('company_name')) : '';
|
224 |
$placeholder = _x('Company Name', '(Admin)', 'gdpr-framework');
|
225 |
echo "<input name='gdpr_company_name' placeholder='{$placeholder}' value='{$value}'>";
|
226 |
}
|
227 |
|
228 |
public function renderCompanyEmailHtml()
|
229 |
{
|
230 |
+
global $gdpr;
|
231 |
+
$value = $gdpr->Options->get('contact_email') ? esc_attr($gdpr->Options->get('contact_email')) : '';
|
232 |
$placeholder = _x('Contact Email', '(Admin)', 'gdpr-framework');
|
233 |
echo "<input type='email' name='gdpr_contact_email' placeholder='{$placeholder}' value='{$value}'>";
|
234 |
}
|
235 |
|
236 |
public function renderCompanyLocationHtml()
|
237 |
{
|
238 |
+
global $gdpr;
|
239 |
+
$country = $gdpr->Options->get('company_location') ? $gdpr->Options->get('company_location') : '';
|
240 |
$countrySelectOptions = gdpr('helpers')->getCountrySelectOptions($country);
|
241 |
echo gdpr('view')->render('admin/privacy-policy/company-location', compact('countrySelectOptions'));
|
242 |
}
|
258 |
|
259 |
public function renderRepresentativeContactName()
|
260 |
{
|
261 |
+
global $gdpr;
|
262 |
+
$value = $gdpr->Options->get('representative_contact_name') ? esc_attr($gdpr->Options->get('representative_contact_name')) : '';
|
263 |
$placeholder = _x('Representative Contact Name', '(Admin)', 'gdpr-framework');
|
264 |
echo "<input name='gdpr_representative_contact_name' placeholder='{$placeholder}' value='{$value}'>";
|
265 |
}
|
266 |
|
267 |
public function renderRepresentativeContactEmail()
|
268 |
{
|
269 |
+
global $gdpr;
|
270 |
+
$value = $gdpr->Options->get('representative_contact_email') ? esc_attr($gdpr->Options->get('representative_contact_email')) : '';
|
271 |
$placeholder = _x('Representative Contact Email', '(Admin)', 'gdpr-framework');
|
272 |
echo "<input type='email' name='gdpr_representative_contact_email' placeholder='{$placeholder}' value='{$value}'>";
|
273 |
}
|
274 |
|
275 |
public function renderRepresentativeContactPhone()
|
276 |
{
|
277 |
+
global $gdpr;
|
278 |
+
$value = $gdpr->Options->get('representative_contact_phone') ? esc_attr($gdpr->Options->get('representative_contact_phone')) : '';
|
279 |
$placeholder = _x('Representative Contact Phone', '(Admin)', 'gdpr-framework');
|
280 |
echo "<input name='gdpr_representative_contact_phone' placeholder='{$placeholder}' value='{$value}'>";
|
281 |
}
|
304 |
|
305 |
public function renderDpaWebsite()
|
306 |
{
|
307 |
+
global $gdpr;
|
308 |
+
$value = $gdpr->Options->get('dpa_website') ? esc_attr($gdpr->Options->get('dpa_website')) : '';
|
309 |
$placeholder = _x('Data Protection Authority Website', '(Admin)', 'gdpr-framework');
|
310 |
echo "<input name='gdpr_dpa_website' id='gdpr_dpa_website' placeholder='{$placeholder}' value='{$value}' data-set='{$value}'>";
|
311 |
}
|
312 |
|
313 |
public function renderDpaEmail()
|
314 |
{
|
315 |
+
global $gdpr;
|
316 |
+
$value = $gdpr->Options->get('dpa_email') ? esc_attr($gdpr->Options->get('dpa_email')) : '';
|
317 |
$placeholder = _x('Data Protection Authority Email', '(Admin)', 'gdpr-framework');
|
318 |
echo "<input type='email' name='gdpr_dpa_email' id='gdpr_dpa_email' placeholder='{$placeholder}' value='{$value}' data-set='{$value}'>";
|
319 |
}
|
320 |
|
321 |
public function renderDpaPhone()
|
322 |
{
|
323 |
+
global $gdpr;
|
324 |
+
$value = $gdpr->Options->get('dpa_phone') ? esc_attr($gdpr->Options->get('dpa_phone')) : '';
|
325 |
$placeholder = _x('Data Protection Authority Phone', '(Admin)', 'gdpr-framework');
|
326 |
echo "<input name='gdpr_dpa_phone' id='gdpr_dpa_phone' placeholder='{$placeholder}' value='{$value}' data-set='{$value}'>";
|
327 |
}
|
332 |
|
333 |
public function renderHasDPOHtml()
|
334 |
{
|
335 |
+
global $gdpr;
|
336 |
+
$hasDPO = $gdpr->Options->get('has_dpo');
|
337 |
echo gdpr('view')->render('admin/privacy-policy/has-dpo', compact('hasDPO'));
|
338 |
}
|
339 |
|
340 |
public function renderDPONameHtml()
|
341 |
{
|
342 |
+
global $gdpr;
|
343 |
+
$value = $gdpr->Options->get('dpo_name') ? esc_attr($gdpr->Options->get('dpo_name')) : '';
|
344 |
$placeholder = _x('DPO Name', '(Admin)', 'gdpr-framework');
|
345 |
echo "<input name='gdpr_dpo_name' placeholder='{$placeholder}' value='{$value}'>";
|
346 |
}
|
347 |
|
348 |
public function renderDPOEmailHtml()
|
349 |
{
|
350 |
+
global $gdpr;
|
351 |
+
$value = $gdpr->Options->get('dpo_email') ? esc_attr($gdpr->Options->get('dpo_email')) : '';
|
352 |
$placeholder = _x('DPO Email', '(Admin)', 'gdpr-framework');
|
353 |
echo "<input type='email' name='gdpr_dpo_email' placeholder='{$placeholder}' value='{$value}'>";
|
354 |
}
|
355 |
|
356 |
public function renderDeleteTextHtml()
|
357 |
{
|
358 |
+
global $gdpr;
|
359 |
+
$value = $gdpr->Options->get('delete_text') ? esc_attr($gdpr->Options->get('delete_text')) : '';
|
360 |
$placeholder = _x('Delete Text', '(Admin)', 'gdpr-framework');
|
361 |
echo "<input name='gdpr_delete_text' placeholder='{$placeholder}' value='{$value}'>";
|
362 |
}
|
363 |
|
364 |
public function generatePolicy()
|
365 |
{
|
366 |
+
global $gdpr;
|
367 |
+
$policyPage = $gdpr->Options->get('policy_page');
|
368 |
|
|
|
369 |
if ( ! $policyPage) {
|
370 |
return;
|
371 |
}
|
396 |
|
397 |
public function renderPolicy()
|
398 |
{
|
399 |
+
global $gdpr;
|
400 |
+
$policyPageId = $gdpr->Options->get('policy_page');
|
401 |
if ($policyPageId) {
|
402 |
$policyUrl = get_edit_post_link($policyPageId);
|
403 |
} else {
|
src/Components/PrivacyPolicy/PolicyGenerator.php
CHANGED
@@ -14,30 +14,31 @@ class PolicyGenerator
|
|
14 |
|
15 |
public function getData()
|
16 |
{
|
17 |
-
$
|
|
|
18 |
$date = date(get_option('date_format'));
|
19 |
|
20 |
return [
|
21 |
-
'companyName' => gdpr
|
22 |
'companyLocation' => $location,
|
23 |
-
'contactEmail' => gdpr
|
24 |
-
gdpr
|
25 |
get_option('admin_email'),
|
26 |
|
27 |
'hasRepresentative' => gdpr('helpers')->countryNeedsRepresentative($location),
|
28 |
-
'representativeContactName' => gdpr
|
29 |
-
'representativeContactEmail' => gdpr
|
30 |
-
'representativeContactPhone' => gdpr
|
31 |
|
32 |
-
'dpaWebsite' => gdpr
|
33 |
-
'dpaEmail' => gdpr
|
34 |
-
'dpaPhone' => gdpr
|
35 |
|
36 |
-
'hasDpo' => gdpr
|
37 |
-
'dpoName' => gdpr
|
38 |
-
'dpoEmail' => gdpr
|
39 |
|
40 |
-
'hasTerms' => gdpr
|
41 |
|
42 |
'date' => $date,
|
43 |
];
|
14 |
|
15 |
public function getData()
|
16 |
{
|
17 |
+
global $gdpr;
|
18 |
+
$location = $gdpr->Options->get('company_location');
|
19 |
$date = date(get_option('date_format'));
|
20 |
|
21 |
return [
|
22 |
+
'companyName' => $gdpr->Options->get('company_name'),
|
23 |
'companyLocation' => $location,
|
24 |
+
'contactEmail' => $gdpr->Options->get('contact_email') ?
|
25 |
+
$gdpr->Options->get('contact_email') :
|
26 |
get_option('admin_email'),
|
27 |
|
28 |
'hasRepresentative' => gdpr('helpers')->countryNeedsRepresentative($location),
|
29 |
+
'representativeContactName' => $gdpr->Options->get('representative_contact_name'),
|
30 |
+
'representativeContactEmail' => $gdpr->Options->get('representative_contact_email'),
|
31 |
+
'representativeContactPhone' => $gdpr->Options->get('representative_contact_phone'),
|
32 |
|
33 |
+
'dpaWebsite' => $gdpr->Options->get('dpa_website'),
|
34 |
+
'dpaEmail' => $gdpr->Options->get('dpa_email'),
|
35 |
+
'dpaPhone' => $gdpr->Options->get('dpa_phone'),
|
36 |
|
37 |
+
'hasDpo' => $gdpr->Options->get('has_dpo'),
|
38 |
+
'dpoName' => $gdpr->Options->get('dpo_name'),
|
39 |
+
'dpoEmail' => $gdpr->Options->get('dpo_email'),
|
40 |
|
41 |
+
'hasTerms' => $gdpr->Options->get('terms_page'),
|
42 |
|
43 |
'date' => $date,
|
44 |
];
|
src/Components/PrivacyPolicy/PrivacyPolicy.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
namespace Codelight\GDPR\Components\PrivacyPolicy;
|
|
|
4 |
/**
|
5 |
* Handles putting together and rendering the privacy policy page
|
6 |
*
|
@@ -21,48 +22,50 @@ class PrivacyPolicy
|
|
21 |
|
22 |
public function registerAdminTab($tabs)
|
23 |
{
|
24 |
-
|
|
|
25 |
|
26 |
return $tabs;
|
27 |
}
|
28 |
|
29 |
public function doShortcode($attributes)
|
30 |
{
|
|
|
31 |
$attributes = shortcode_atts([
|
32 |
'item' => null,
|
33 |
], $attributes);
|
34 |
|
35 |
switch ($attributes['item']) {
|
36 |
case 'company_name':
|
37 |
-
return esc_html(gdpr
|
38 |
case 'company_email':
|
39 |
-
return esc_html(gdpr
|
40 |
case 'company_email_link':
|
41 |
-
$email = antispambot(gdpr
|
42 |
return "<a href='mailto:{$email}'>{$email}</a>";
|
43 |
case 'dpo_name':
|
44 |
-
return esc_html(gdpr
|
45 |
case 'dpo_email':
|
46 |
-
return esc_html(gdpr
|
47 |
case 'dpo_email_link':
|
48 |
-
$email = antispambot(gdpr
|
49 |
return "<a href='mailto:{$email}'>{$email}</a>";
|
50 |
case 'rep_name':
|
51 |
-
return esc_html(gdpr
|
52 |
case 'rep_email':
|
53 |
-
return esc_html(gdpr
|
54 |
case 'rep_email_link':
|
55 |
-
$email = antispambot(gdpr
|
56 |
return "<a href='mailto:{$email}'>{$email}</a>";
|
57 |
case 'authority_website':
|
58 |
-
return esc_html(gdpr
|
59 |
case 'authority_email':
|
60 |
-
return esc_html(gdpr
|
61 |
case 'authority_email_link':
|
62 |
-
$email = antispambot(gdpr
|
63 |
return "<a href='mailto:{$email}'>{$email}</a>";
|
64 |
case 'authority_phone':
|
65 |
-
return esc_html(gdpr
|
66 |
case null:
|
67 |
return '';
|
68 |
}
|
@@ -72,11 +75,13 @@ class PrivacyPolicy
|
|
72 |
|
73 |
public function renderUrlShortcode()
|
74 |
{
|
|
|
75 |
return gdpr('helpers')->getPrivacyPolicyPageUrl();
|
76 |
}
|
77 |
|
78 |
public function renderLinkShortcode($attributes)
|
79 |
{
|
|
|
80 |
$attributes = shortcode_atts([
|
81 |
'title' => __('Privacy Policy', 'gdpr-framework'),
|
82 |
], $attributes);
|
1 |
<?php
|
2 |
|
3 |
namespace Codelight\GDPR\Components\PrivacyPolicy;
|
4 |
+
|
5 |
/**
|
6 |
* Handles putting together and rendering the privacy policy page
|
7 |
*
|
22 |
|
23 |
public function registerAdminTab($tabs)
|
24 |
{
|
25 |
+
|
26 |
+
$tabs['privacy-policy'] = new AdminTabPrivacyPolicy(new PolicyGenerator());
|
27 |
|
28 |
return $tabs;
|
29 |
}
|
30 |
|
31 |
public function doShortcode($attributes)
|
32 |
{
|
33 |
+
global $gdpr;
|
34 |
$attributes = shortcode_atts([
|
35 |
'item' => null,
|
36 |
], $attributes);
|
37 |
|
38 |
switch ($attributes['item']) {
|
39 |
case 'company_name':
|
40 |
+
return esc_html($gdpr->Options->get('company_name'));
|
41 |
case 'company_email':
|
42 |
+
return esc_html($gdpr->Options->get('contact_email'));
|
43 |
case 'company_email_link':
|
44 |
+
$email = antispambot($gdpr->Options->get('contact_email'));
|
45 |
return "<a href='mailto:{$email}'>{$email}</a>";
|
46 |
case 'dpo_name':
|
47 |
+
return esc_html($gdpr->Options->get('dpo_name'));
|
48 |
case 'dpo_email':
|
49 |
+
return esc_html($gdpr->Options->get('dpo_email'));
|
50 |
case 'dpo_email_link':
|
51 |
+
$email = antispambot($gdpr->Options->get('dpo_email'));
|
52 |
return "<a href='mailto:{$email}'>{$email}</a>";
|
53 |
case 'rep_name':
|
54 |
+
return esc_html($gdpr->Options->get('representative_contact_name'));
|
55 |
case 'rep_email':
|
56 |
+
return esc_html($gdpr->Options->get('representative_contact_email'));
|
57 |
case 'rep_email_link':
|
58 |
+
$email = antispambot($gdpr->Options->get('representative_contact_email'));
|
59 |
return "<a href='mailto:{$email}'>{$email}</a>";
|
60 |
case 'authority_website':
|
61 |
+
return esc_html($gdpr->Options->get('dpa_website'));
|
62 |
case 'authority_email':
|
63 |
+
return esc_html($gdpr->Options->get('dpa_email'));
|
64 |
case 'authority_email_link':
|
65 |
+
$email = antispambot($gdpr->Options->get('dpa_email'));
|
66 |
return "<a href='mailto:{$email}'>{$email}</a>";
|
67 |
case 'authority_phone':
|
68 |
+
return esc_html($gdpr->Options->get('dpa_phone'));
|
69 |
case null:
|
70 |
return '';
|
71 |
}
|
75 |
|
76 |
public function renderUrlShortcode()
|
77 |
{
|
78 |
+
global $gdpr;
|
79 |
return gdpr('helpers')->getPrivacyPolicyPageUrl();
|
80 |
}
|
81 |
|
82 |
public function renderLinkShortcode($attributes)
|
83 |
{
|
84 |
+
global $gdpr;
|
85 |
$attributes = shortcode_atts([
|
86 |
'title' => __('Privacy Policy', 'gdpr-framework'),
|
87 |
], $attributes);
|
src/Components/PrivacySafe/PrivacySafe.php
CHANGED
@@ -9,7 +9,7 @@ class PrivacySafe {
|
|
9 |
}
|
10 |
|
11 |
public function registerAdminTab( $tabs ) {
|
12 |
-
$tabs['privacy-safe'] =
|
13 |
return $tabs;
|
14 |
}
|
15 |
}
|
9 |
}
|
10 |
|
11 |
public function registerAdminTab( $tabs ) {
|
12 |
+
$tabs['privacy-safe'] = new AdminTabPrivacySafe();
|
13 |
return $tabs;
|
14 |
}
|
15 |
}
|
src/Components/PrivacyToolsPage/PrivacyToolsPage.php
CHANGED
@@ -6,10 +6,14 @@ class PrivacyToolsPage
|
|
6 |
{
|
7 |
public function __construct()
|
8 |
{
|
9 |
-
gdpr
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
14 |
}
|
15 |
}
|
6 |
{
|
7 |
public function __construct()
|
8 |
{
|
9 |
+
global $gdpr;
|
10 |
+
$controller = new PrivacyToolsPageController(
|
11 |
+
$gdpr->DataSubjectAuthenticator
|
12 |
+
, $gdpr->DataSubjectIdentificator
|
13 |
+
, $gdpr->DataSubject
|
14 |
+
, $gdpr->DataExporter
|
15 |
+
, $gdpr->UserConsentModel
|
16 |
+
);
|
17 |
+
new PrivacyToolsPageShortcode($controller, $gdpr->Consent);
|
18 |
}
|
19 |
}
|
src/Components/PrivacyToolsPage/PrivacyToolsPageController.php
CHANGED
@@ -76,9 +76,10 @@ class PrivacyToolsPageController {
|
|
76 |
}
|
77 |
|
78 |
public function enqueue_donotsell() {
|
|
|
79 |
wp_enqueue_script(
|
80 |
'donot-sell-form',
|
81 |
-
gdpr
|
82 |
array( 'jquery' ),
|
83 |
GDPR_FRAMEWORK_VERSION,
|
84 |
true
|
@@ -93,13 +94,14 @@ class PrivacyToolsPageController {
|
|
93 |
}
|
94 |
|
95 |
public function enqueue() {
|
|
|
96 |
if ( ! gdpr( 'options' )->get( 'enable_stylesheet' ) || ! is_page( gdpr( 'options' )->get( 'tools_page' ) ) ) {
|
97 |
return;
|
98 |
}
|
99 |
|
100 |
wp_enqueue_style(
|
101 |
'gdpr-framework-privacy-tools',
|
102 |
-
gdpr
|
103 |
);
|
104 |
|
105 |
}
|
76 |
}
|
77 |
|
78 |
public function enqueue_donotsell() {
|
79 |
+
global $gdpr;
|
80 |
wp_enqueue_script(
|
81 |
'donot-sell-form',
|
82 |
+
$gdpr->PluginUrl . 'assets/js/gdpr-donotsell.js',
|
83 |
array( 'jquery' ),
|
84 |
GDPR_FRAMEWORK_VERSION,
|
85 |
true
|
94 |
}
|
95 |
|
96 |
public function enqueue() {
|
97 |
+
global $gdpr;
|
98 |
if ( ! gdpr( 'options' )->get( 'enable_stylesheet' ) || ! is_page( gdpr( 'options' )->get( 'tools_page' ) ) ) {
|
99 |
return;
|
100 |
}
|
101 |
|
102 |
wp_enqueue_style(
|
103 |
'gdpr-framework-privacy-tools',
|
104 |
+
$gdpr->PluginUrl . 'assets/privacy-tools.css'
|
105 |
);
|
106 |
|
107 |
}
|
src/Components/PrivacyToolsPage/PrivacyToolsPageShortcode.php
CHANGED
@@ -18,11 +18,12 @@ class PrivacyToolsPageShortcode
|
|
18 |
|
19 |
public function renderPage()
|
20 |
{
|
21 |
-
|
|
|
22 |
return __('This page is currently disabled.', 'gdpr-framework');
|
23 |
}
|
24 |
|
25 |
-
if ((
|
26 |
return __('Please configure the Privacy Tools page in the admin interface.', 'gdpr-framework');
|
27 |
}
|
28 |
|
@@ -51,11 +52,12 @@ class PrivacyToolsPageShortcode
|
|
51 |
}
|
52 |
public function renderDoNotSellForm()
|
53 |
{
|
54 |
-
|
|
|
55 |
return __('This page is currently disabled.', 'gdpr-framework');
|
56 |
}
|
57 |
|
58 |
-
if (
|
59 |
return __('Please configure the Privacy Tools page in the admin interface.', 'gdpr-framework');
|
60 |
}
|
61 |
$slug = 'do-not-sell-request';
|
18 |
|
19 |
public function renderPage()
|
20 |
{
|
21 |
+
global $gdpr;
|
22 |
+
if (!$gdpr->Options->get('enable')) {
|
23 |
return __('This page is currently disabled.', 'gdpr-framework');
|
24 |
}
|
25 |
|
26 |
+
if ((!$gdpr->Options->get('tools_page') || is_null(get_post($gdpr->Options->get('tools_page')))) && !$gdpr->Options->get('custom_tools_page')) {
|
27 |
return __('Please configure the Privacy Tools page in the admin interface.', 'gdpr-framework');
|
28 |
}
|
29 |
|
52 |
}
|
53 |
public function renderDoNotSellForm()
|
54 |
{
|
55 |
+
global $gdpr;
|
56 |
+
if (!$gdpr->Options->get('enable')) {
|
57 |
return __('This page is currently disabled.', 'gdpr-framework');
|
58 |
}
|
59 |
|
60 |
+
if (!$gdpr->Options->get('tools_page') || is_null(get_post($gdpr->Options->get('tools_page')))) {
|
61 |
return __('Please configure the Privacy Tools page in the admin interface.', 'gdpr-framework');
|
62 |
}
|
63 |
$slug = 'do-not-sell-request';
|
src/Components/Support/Support.php
CHANGED
@@ -11,7 +11,7 @@ class Support
|
|
11 |
|
12 |
public function registerTab($tabs)
|
13 |
{
|
14 |
-
$tabs['support'] =
|
15 |
|
16 |
return $tabs;
|
17 |
}
|
11 |
|
12 |
public function registerTab($tabs)
|
13 |
{
|
14 |
+
$tabs['support'] = new AdminTabSupport();
|
15 |
|
16 |
return $tabs;
|
17 |
}
|
src/Components/Themes/Themes.php
CHANGED
@@ -14,16 +14,17 @@ class Themes
|
|
14 |
];
|
15 |
|
16 |
public function __construct()
|
17 |
-
{
|
|
|
18 |
$this->theme = get_option('stylesheet');
|
19 |
|
20 |
-
if (!$this->isCurrentThemeSupported() ||
|
21 |
return;
|
22 |
}
|
23 |
|
24 |
// If both pages aren't defined, bail
|
25 |
-
$privacyPolicy = gdpr
|
26 |
-
$privacyToolsPage = gdpr
|
27 |
|
28 |
if (!$privacyPolicy || !$privacyToolsPage) {
|
29 |
return;
|
@@ -61,12 +62,13 @@ class Themes
|
|
61 |
// I feel slightly dirty, but also clever
|
62 |
add_filter("storefront_credit_link", [$this, 'renderStorefrontFooterLinks']);
|
63 |
}
|
64 |
-
public function rendertwentynineteenFooterLinks()
|
65 |
-
|
66 |
-
$
|
|
|
67 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
68 |
$privacyPolicyUrl = apply_filters( 'gdpr_custom_policy_link',$privacyPolicyUrl);
|
69 |
-
$privacyToolsPageUrl = get_permalink(gdpr
|
70 |
|
71 |
echo gdpr('view')->render(
|
72 |
'themes/twentyseventeen/footer',
|
@@ -75,14 +77,15 @@ class Themes
|
|
75 |
}
|
76 |
public function renderTwentyseventeenFooterLinks($slug, $name)
|
77 |
{
|
|
|
78 |
if ('info' !== $name) {
|
79 |
return;
|
80 |
}
|
81 |
|
82 |
-
$privacyPolicyUrl = get_permalink(gdpr
|
83 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
84 |
$privacyPolicyUrl = apply_filters( 'gdpr_custom_policy_link',$privacyPolicyUrl);
|
85 |
-
$privacyToolsPageUrl = get_permalink(gdpr
|
86 |
|
87 |
echo gdpr('view')->render(
|
88 |
'themes/twentyseventeen/footer',
|
@@ -92,10 +95,11 @@ class Themes
|
|
92 |
|
93 |
public function renderTwentysixteenFooterLinks()
|
94 |
{
|
95 |
-
$
|
|
|
96 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
97 |
$privacyPolicyUrl = apply_filters( 'gdpr_custom_policy_link',$privacyPolicyUrl);
|
98 |
-
$privacyToolsPageUrl = get_permalink(gdpr
|
99 |
|
100 |
echo gdpr('view')->render(
|
101 |
'themes/twentysixteen/footer',
|
@@ -105,10 +109,11 @@ class Themes
|
|
105 |
|
106 |
public function renderStorefrontFooterLinks($value)
|
107 |
{
|
108 |
-
$
|
|
|
109 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
110 |
$privacyPolicyUrl = apply_filters( 'gdpr_custom_policy_link',$privacyPolicyUrl);
|
111 |
-
$privacyToolsPageUrl = get_permalink(gdpr
|
112 |
|
113 |
echo gdpr('view')->render(
|
114 |
'themes/storefront/footer',
|
14 |
];
|
15 |
|
16 |
public function __construct()
|
17 |
+
{
|
18 |
+
global $gdpr;
|
19 |
$this->theme = get_option('stylesheet');
|
20 |
|
21 |
+
if (!$this->isCurrentThemeSupported() || !$gdpr->Options->get('enable_theme_compatibility')) {
|
22 |
return;
|
23 |
}
|
24 |
|
25 |
// If both pages aren't defined, bail
|
26 |
+
$privacyPolicy = $gdpr->Options->get('policy_page');
|
27 |
+
$privacyToolsPage = $gdpr->Options->get('tools_page');
|
28 |
|
29 |
if (!$privacyPolicy || !$privacyToolsPage) {
|
30 |
return;
|
62 |
// I feel slightly dirty, but also clever
|
63 |
add_filter("storefront_credit_link", [$this, 'renderStorefrontFooterLinks']);
|
64 |
}
|
65 |
+
public function rendertwentynineteenFooterLinks()
|
66 |
+
{
|
67 |
+
global $gdpr;
|
68 |
+
$privacyPolicyUrl = get_permalink($gdpr->Options->get('policy_page'));
|
69 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
70 |
$privacyPolicyUrl = apply_filters( 'gdpr_custom_policy_link',$privacyPolicyUrl);
|
71 |
+
$privacyToolsPageUrl = get_permalink($gdpr->Options->get('tools_page'));
|
72 |
|
73 |
echo gdpr('view')->render(
|
74 |
'themes/twentyseventeen/footer',
|
77 |
}
|
78 |
public function renderTwentyseventeenFooterLinks($slug, $name)
|
79 |
{
|
80 |
+
global $gdpr;
|
81 |
if ('info' !== $name) {
|
82 |
return;
|
83 |
}
|
84 |
|
85 |
+
$privacyPolicyUrl = get_permalink($gdpr->Options->get('policy_page'));
|
86 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
87 |
$privacyPolicyUrl = apply_filters( 'gdpr_custom_policy_link',$privacyPolicyUrl);
|
88 |
+
$privacyToolsPageUrl = get_permalink($gdpr->Options->get('tools_page'));
|
89 |
|
90 |
echo gdpr('view')->render(
|
91 |
'themes/twentyseventeen/footer',
|
95 |
|
96 |
public function renderTwentysixteenFooterLinks()
|
97 |
{
|
98 |
+
global $gdpr;
|
99 |
+
$privacyPolicyUrl = get_permalink($gdpr->Options->get('policy_page'));
|
100 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
101 |
$privacyPolicyUrl = apply_filters( 'gdpr_custom_policy_link',$privacyPolicyUrl);
|
102 |
+
$privacyToolsPageUrl = get_permalink($gdpr->Options->get('tools_page'));
|
103 |
|
104 |
echo gdpr('view')->render(
|
105 |
'themes/twentysixteen/footer',
|
109 |
|
110 |
public function renderStorefrontFooterLinks($value)
|
111 |
{
|
112 |
+
global $gdpr;
|
113 |
+
$privacyPolicyUrl = get_permalink($gdpr->Options->get('policy_page'));
|
114 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
115 |
$privacyPolicyUrl = apply_filters( 'gdpr_custom_policy_link',$privacyPolicyUrl);
|
116 |
+
$privacyToolsPageUrl = get_permalink($gdpr->Options->get('tools_page'));
|
117 |
|
118 |
echo gdpr('view')->render(
|
119 |
'themes/storefront/footer',
|
src/Components/WordpressComments/WordpressComments.php
CHANGED
@@ -190,8 +190,6 @@ class WordpressComments {
|
|
190 |
}
|
191 |
|
192 |
/**
|
193 |
-
* Todo: this currently doesn't include spam or trashed comments
|
194 |
-
*
|
195 |
* @param $email
|
196 |
* @return array|int
|
197 |
*/
|
190 |
}
|
191 |
|
192 |
/**
|
|
|
|
|
193 |
* @param $email
|
194 |
* @return array|int
|
195 |
*/
|
src/Components/WordpressUser/Controllers/DashboardDataPageController.php
CHANGED
@@ -80,6 +80,7 @@ class DashboardDataPageController
|
|
80 |
*/
|
81 |
public function renderConsentForm(DataSubject $dataSubject)
|
82 |
{
|
|
|
83 |
$consentData = $dataSubject->getVisibleConsentData();
|
84 |
|
85 |
foreach ($consentData as &$item) {
|
@@ -91,7 +92,7 @@ class DashboardDataPageController
|
|
91 |
]);
|
92 |
}
|
93 |
|
94 |
-
$consentInfo = wpautop(gdpr
|
95 |
|
96 |
echo gdpr('view')->render(
|
97 |
"modules/wordpress-user/dashboard/data-page/form-consent",
|
80 |
*/
|
81 |
public function renderConsentForm(DataSubject $dataSubject)
|
82 |
{
|
83 |
+
global $gdpr;
|
84 |
$consentData = $dataSubject->getVisibleConsentData();
|
85 |
|
86 |
foreach ($consentData as &$item) {
|
92 |
]);
|
93 |
}
|
94 |
|
95 |
+
$consentInfo = wpautop($gdpr->Options->get('consent_info'));
|
96 |
|
97 |
echo gdpr('view')->render(
|
98 |
"modules/wordpress-user/dashboard/data-page/form-consent",
|
src/Components/WordpressUser/DataManager.php
CHANGED
@@ -71,11 +71,12 @@ class DataManager
|
|
71 |
|
72 |
public function deleteUser(DataSubject $dataSubject, $reassign = null)
|
73 |
{
|
|
|
74 |
require_once(ABSPATH . 'wp-admin/includes/user.php');
|
75 |
|
76 |
-
$reassignOption = gdpr
|
77 |
if ('reassign' === $reassignOption) {
|
78 |
-
$reassignUserId = gdpr
|
79 |
} else {
|
80 |
$reassignUserId = false;
|
81 |
}
|
71 |
|
72 |
public function deleteUser(DataSubject $dataSubject, $reassign = null)
|
73 |
{
|
74 |
+
global $gdpr;
|
75 |
require_once(ABSPATH . 'wp-admin/includes/user.php');
|
76 |
|
77 |
+
$reassignOption = $gdpr->Options->get('delete_action_reassign');
|
78 |
if ('reassign' === $reassignOption) {
|
79 |
+
$reassignUserId = $gdpr->Options->get('delete_action_reassign_user');
|
80 |
} else {
|
81 |
$reassignUserId = false;
|
82 |
}
|
src/Components/WordpressUser/RegistrationForm.php
CHANGED
@@ -12,9 +12,10 @@ class RegistrationForm
|
|
12 |
|
13 |
public function __construct(DataSubjectManager $dataSubjectManager)
|
14 |
{
|
|
|
15 |
$this->dataSubjectManager = $dataSubjectManager;
|
16 |
-
if(
|
17 |
-
if (gdpr
|
18 |
add_action('register_form', [$this, 'addRegisterFormCheckbox']);
|
19 |
add_filter('registration_errors', [$this, 'validate'], PHP_INT_MAX);
|
20 |
}
|
@@ -23,20 +24,21 @@ class RegistrationForm
|
|
23 |
|
24 |
public function addRegisterFormCheckbox()
|
25 |
{
|
|
|
26 |
$privacyPolicyUrl = ! get_permalink( gdpr( 'options' )->get( 'custom_policy_page' ) ) ? get_permalink( gdpr( 'options' )->get( 'policy_page' ) ) : get_permalink( gdpr( 'options' )->get( 'custom_policy_page' ) );
|
27 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
28 |
$privacyPolicyUrl = apply_filters( 'gdpr_custom_policy_link',$privacyPolicyUrl);
|
29 |
-
$termsPage = ! gdpr
|
30 |
|
31 |
-
if(gdpr
|
32 |
-
$termsPage = gdpr
|
33 |
if ($termsPage) {
|
34 |
$termsUrl = $termsPage;
|
35 |
} else {
|
36 |
$termsUrl = false;
|
37 |
}
|
38 |
}else{
|
39 |
-
$termsPage = gdpr
|
40 |
if ($termsPage) {
|
41 |
$termsUrl = get_permalink($termsPage);
|
42 |
} else {
|
12 |
|
13 |
public function __construct(DataSubjectManager $dataSubjectManager)
|
14 |
{
|
15 |
+
global $gdpr;
|
16 |
$this->dataSubjectManager = $dataSubjectManager;
|
17 |
+
if(!$gdpr->Options->get('register_checkbox')){
|
18 |
+
if ($gdpr->Options->get('policy_page') || $gdpr->Options->get('custom_policy_page')) {
|
19 |
add_action('register_form', [$this, 'addRegisterFormCheckbox']);
|
20 |
add_filter('registration_errors', [$this, 'validate'], PHP_INT_MAX);
|
21 |
}
|
24 |
|
25 |
public function addRegisterFormCheckbox()
|
26 |
{
|
27 |
+
global $gdpr;
|
28 |
$privacyPolicyUrl = ! get_permalink( gdpr( 'options' )->get( 'custom_policy_page' ) ) ? get_permalink( gdpr( 'options' )->get( 'policy_page' ) ) : get_permalink( gdpr( 'options' )->get( 'custom_policy_page' ) );
|
29 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
30 |
$privacyPolicyUrl = apply_filters( 'gdpr_custom_policy_link',$privacyPolicyUrl);
|
31 |
+
$termsPage = ! $gdpr->Options->get('custom_terms_page') ? $gdpr->Options->get('terms_page') : $gdpr->Options->get('custom_terms_page');
|
32 |
|
33 |
+
if($gdpr->Options->get('custom_terms_page')){
|
34 |
+
$termsPage = $gdpr->Options->get('custom_terms_page');
|
35 |
if ($termsPage) {
|
36 |
$termsUrl = $termsPage;
|
37 |
} else {
|
38 |
$termsUrl = false;
|
39 |
}
|
40 |
}else{
|
41 |
+
$termsPage = $gdpr->Options->get('terms_page');
|
42 |
if ($termsPage) {
|
43 |
$termsUrl = get_permalink($termsPage);
|
44 |
} else {
|
src/Components/WordpressUser/WordpressUser.php
CHANGED
@@ -31,15 +31,16 @@ class WordpressUser
|
|
31 |
* @param DataManager $dataManager
|
32 |
*/
|
33 |
public function __construct(DataSubjectManager $dataSubjectManager, DataManager $dataManager)
|
34 |
-
{
|
|
|
35 |
$this->dataSubjectManager = $dataSubjectManager;
|
36 |
$this->dataManager = $dataManager;
|
37 |
|
38 |
-
gdpr
|
39 |
-
|
40 |
|
41 |
-
if (gdpr
|
42 |
-
gdpr
|
43 |
|
44 |
// Register Privacy Tools page in admin
|
45 |
add_action('admin_menu', [$this, 'registerDashboardDataPage']);
|
31 |
* @param DataManager $dataManager
|
32 |
*/
|
33 |
public function __construct(DataSubjectManager $dataSubjectManager, DataManager $dataManager)
|
34 |
+
{
|
35 |
+
global $gdpr;
|
36 |
$this->dataSubjectManager = $dataSubjectManager;
|
37 |
$this->dataManager = $dataManager;
|
38 |
|
39 |
+
new DashboardProfilePageController($dataSubjectManager, $gdpr->DataExporter);
|
40 |
+
new RegistrationForm($dataSubjectManager);
|
41 |
|
42 |
+
if ($gdpr->Options->get('enable')) {
|
43 |
+
new DashboardDataPageController($gdpr->DataExporter, $gdpr->DataSubjectAuthenticator);
|
44 |
|
45 |
// Register Privacy Tools page in admin
|
46 |
add_action('admin_menu', [$this, 'registerDashboardDataPage']);
|
src/Config.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Codelight\GDPR;
|
4 |
-
|
5 |
-
class Config extends \Data443\gdpr\framework\Illuminate\Config\Repository
|
6 |
-
{
|
7 |
-
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Container.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Codelight\GDPR;
|
4 |
-
|
5 |
-
class Container extends \Data443\gdpr\framework\Illuminate\Container\Container
|
6 |
-
{
|
7 |
-
protected static $instance;
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/DataSubject/DataRepository.php
CHANGED
@@ -35,7 +35,8 @@ class DataRepository
|
|
35 |
*/
|
36 |
public function export($email, $format, $force = false)
|
37 |
{
|
38 |
-
$
|
|
|
39 |
$data = null;
|
40 |
|
41 |
if ($force) {
|
@@ -70,7 +71,8 @@ class DataRepository
|
|
70 |
*/
|
71 |
public function forget($email, $forceAction = null)
|
72 |
{
|
73 |
-
$
|
|
|
74 |
|
75 |
if ($forceAction) {
|
76 |
$action = $forceAction;
|
@@ -138,8 +140,9 @@ class DataRepository
|
|
138 |
*/
|
139 |
protected function notifyExportAction($email, $format)
|
140 |
{
|
|
|
141 |
gdpr('helpers')->mail(
|
142 |
-
gdpr
|
143 |
__("Data exported", 'gdpr-framework'),
|
144 |
gdpr('view')->render('email/action-export', compact('email', 'format')),
|
145 |
['Content-Type: text/html; charset=UTF-8']
|
@@ -151,10 +154,11 @@ class DataRepository
|
|
151 |
*/
|
152 |
protected function notifyExportRequest($email, $format)
|
153 |
{
|
|
|
154 |
$adminTabLink = esc_url(gdpr('helpers')->getAdminUrl('&gdpr-tab=data-subject&search=' . $email));
|
155 |
|
156 |
gdpr('helpers')->mail(
|
157 |
-
gdpr
|
158 |
__("Data export request", 'gdpr-framework'),
|
159 |
gdpr('view')->render('email/request-export', compact('email', 'format', 'adminTabLink')),
|
160 |
['Content-Type: text/html; charset=UTF-8']
|
@@ -166,8 +170,9 @@ class DataRepository
|
|
166 |
*/
|
167 |
protected function notifyForgetAction($email, $userId = null)
|
168 |
{
|
|
|
169 |
gdpr('helpers')->mail(
|
170 |
-
gdpr
|
171 |
__("Data removed", 'gdpr-framework'),
|
172 |
gdpr('view')->render('email/action-forget', compact('email', 'userId')),
|
173 |
['Content-Type: text/html; charset=UTF-8']
|
@@ -179,10 +184,11 @@ class DataRepository
|
|
179 |
*/
|
180 |
protected function notifyForgetRequest($email)
|
181 |
{
|
|
|
182 |
$adminTabLink = esc_url(gdpr('helpers')->getAdminUrl('&gdpr-tab=data-subject&search=' . $email));
|
183 |
|
184 |
gdpr('helpers')->mail(
|
185 |
-
gdpr
|
186 |
__("Data removal request", 'gdpr-framework'),
|
187 |
gdpr('view')->render('email/request-forget', compact('email', 'adminTabLink')),
|
188 |
['Content-Type: text/html; charset=UTF-8']
|
35 |
*/
|
36 |
public function export($email, $format, $force = false)
|
37 |
{
|
38 |
+
global $gdpr;
|
39 |
+
$action = $gdpr->Options->get('export_action');
|
40 |
$data = null;
|
41 |
|
42 |
if ($force) {
|
71 |
*/
|
72 |
public function forget($email, $forceAction = null)
|
73 |
{
|
74 |
+
global $gdpr;
|
75 |
+
$action = $gdpr->Options->get('delete_action');
|
76 |
|
77 |
if ($forceAction) {
|
78 |
$action = $forceAction;
|
140 |
*/
|
141 |
protected function notifyExportAction($email, $format)
|
142 |
{
|
143 |
+
global $gdpr;
|
144 |
gdpr('helpers')->mail(
|
145 |
+
$gdpr->Options->get('export_action_email'),
|
146 |
__("Data exported", 'gdpr-framework'),
|
147 |
gdpr('view')->render('email/action-export', compact('email', 'format')),
|
148 |
['Content-Type: text/html; charset=UTF-8']
|
154 |
*/
|
155 |
protected function notifyExportRequest($email, $format)
|
156 |
{
|
157 |
+
global $gdpr;
|
158 |
$adminTabLink = esc_url(gdpr('helpers')->getAdminUrl('&gdpr-tab=data-subject&search=' . $email));
|
159 |
|
160 |
gdpr('helpers')->mail(
|
161 |
+
$gdpr->Options->get('export_action_email'),
|
162 |
__("Data export request", 'gdpr-framework'),
|
163 |
gdpr('view')->render('email/request-export', compact('email', 'format', 'adminTabLink')),
|
164 |
['Content-Type: text/html; charset=UTF-8']
|
170 |
*/
|
171 |
protected function notifyForgetAction($email, $userId = null)
|
172 |
{
|
173 |
+
global $gdpr;
|
174 |
gdpr('helpers')->mail(
|
175 |
+
$gdpr->Options->get('delete_action_email'),
|
176 |
__("Data removed", 'gdpr-framework'),
|
177 |
gdpr('view')->render('email/action-forget', compact('email', 'userId')),
|
178 |
['Content-Type: text/html; charset=UTF-8']
|
184 |
*/
|
185 |
protected function notifyForgetRequest($email)
|
186 |
{
|
187 |
+
global $gdpr;
|
188 |
$adminTabLink = esc_url(gdpr('helpers')->getAdminUrl('&gdpr-tab=data-subject&search=' . $email));
|
189 |
|
190 |
gdpr('helpers')->mail(
|
191 |
+
$gdpr->Options->get('delete_action_email'),
|
192 |
__("Data removal request", 'gdpr-framework'),
|
193 |
gdpr('view')->render('email/request-forget', compact('email', 'adminTabLink')),
|
194 |
['Content-Type: text/html; charset=UTF-8']
|
src/DataSubject/DataSubjectAdmin.php
CHANGED
@@ -11,7 +11,9 @@ class DataSubjectAdmin
|
|
11 |
|
12 |
public function registerTab($tabs)
|
13 |
{
|
14 |
-
$
|
|
|
|
|
15 |
|
16 |
return $tabs;
|
17 |
}
|
11 |
|
12 |
public function registerTab($tabs)
|
13 |
{
|
14 |
+
global $gdpr;
|
15 |
+
|
16 |
+
$tabs['data-subject'] = new AdminTabDataSubject($gdpr->DataSubject);
|
17 |
|
18 |
return $tabs;
|
19 |
}
|
src/DataSubject/DataSubjectAuthenticator.php
CHANGED
@@ -52,6 +52,7 @@ class DataSubjectAuthenticator
|
|
52 |
*/
|
53 |
public function identify()
|
54 |
{
|
|
|
55 |
// Do not attempt to identify logged in users
|
56 |
if (is_user_logged_in()) {
|
57 |
return;
|
@@ -59,7 +60,7 @@ class DataSubjectAuthenticator
|
|
59 |
|
60 |
if (isset($_REQUEST['gdpr_key']) && isset($_REQUEST['email'])) {
|
61 |
$gdpr_email = sanitize_email($_REQUEST['email']);
|
62 |
-
$privacyToolsPageUrl = get_permalink(gdpr
|
63 |
$privacyToolsPageUrl = apply_filters('privacy_tools_gdprf_page_url',$privacyToolsPageUrl);
|
64 |
|
65 |
if ($this->dataSubjectIdentificator->isKeyValid($gdpr_email, $_REQUEST['gdpr_key'])) {
|
52 |
*/
|
53 |
public function identify()
|
54 |
{
|
55 |
+
global $gdpr;
|
56 |
// Do not attempt to identify logged in users
|
57 |
if (is_user_logged_in()) {
|
58 |
return;
|
60 |
|
61 |
if (isset($_REQUEST['gdpr_key']) && isset($_REQUEST['email'])) {
|
62 |
$gdpr_email = sanitize_email($_REQUEST['email']);
|
63 |
+
$privacyToolsPageUrl = get_permalink($gdpr->Options->get('tools_page'));
|
64 |
$privacyToolsPageUrl = apply_filters('privacy_tools_gdprf_page_url',$privacyToolsPageUrl);
|
65 |
|
66 |
if ($this->dataSubjectIdentificator->isKeyValid($gdpr_email, $_REQUEST['gdpr_key'])) {
|
src/DataSubject/DataSubjectManager.php
CHANGED
@@ -35,14 +35,8 @@ class DataSubjectManager
|
|
35 |
$email = sanitize_email($email);
|
36 |
$user = get_user_by('email', $email);
|
37 |
|
38 |
-
|
39 |
-
|
40 |
-
[
|
41 |
-
'email' => $email,
|
42 |
-
'user' => $user ? $user : null,
|
43 |
-
'consentManager' => $this->consentManager,
|
44 |
-
]
|
45 |
-
);
|
46 |
}
|
47 |
|
48 |
/**
|
@@ -68,14 +62,9 @@ class DataSubjectManager
|
|
68 |
return false;
|
69 |
}
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
'email' => sanitize_email($user->user_email),
|
75 |
-
'user' => $user,
|
76 |
-
'consentManager' => $this->consentManager,
|
77 |
-
]
|
78 |
-
);
|
79 |
}
|
80 |
|
81 |
/**
|
35 |
$email = sanitize_email($email);
|
36 |
$user = get_user_by('email', $email);
|
37 |
|
38 |
+
$dataSubject = new DataSubject($email, $user?$user:null, $this->consentManager);
|
39 |
+
return $dataSubject;
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
|
42 |
/**
|
62 |
return false;
|
63 |
}
|
64 |
|
65 |
+
$email = sanitize_email($user->user_email);
|
66 |
+
$dataSubject = new DataSubject($email, $user, $this->consentManager);
|
67 |
+
return $dataSubject;
|
|
|
|
|
|
|
|
|
|
|
68 |
}
|
69 |
|
70 |
/**
|
src/Helpers.php
CHANGED
@@ -13,7 +13,8 @@ class Helpers
|
|
13 |
{
|
14 |
public function supportUrl($url = '')
|
15 |
{
|
16 |
-
|
|
|
17 |
}
|
18 |
|
19 |
/**
|
@@ -314,11 +315,13 @@ class Helpers
|
|
314 |
*/
|
315 |
public function getDataProtectionAuthorityInfo($countryCode = null)
|
316 |
{
|
|
|
|
|
317 |
if (!$countryCode) {
|
318 |
-
$countryCode = gdpr
|
319 |
}
|
320 |
|
321 |
-
$dpaData = require(gdpr
|
322 |
|
323 |
if (isset($dpaData[$countryCode])) {
|
324 |
return $dpaData[$countryCode];
|
@@ -332,7 +335,8 @@ class Helpers
|
|
332 |
*/
|
333 |
public function getDataProtectionAuthorities()
|
334 |
{
|
335 |
-
|
|
|
336 |
}
|
337 |
|
338 |
public function getAdminUrl($suffix = '')
|
@@ -352,11 +356,12 @@ class Helpers
|
|
352 |
|
353 |
public function getPrivacyToolsPageUrl()
|
354 |
{
|
355 |
-
|
356 |
-
|
|
|
357 |
return $privacyToolsUrl;
|
358 |
}else{
|
359 |
-
$toolsPageId = gdpr
|
360 |
return $toolsPageId ? get_permalink($toolsPageId) : '';
|
361 |
}
|
362 |
|
@@ -364,7 +369,8 @@ class Helpers
|
|
364 |
|
365 |
public function getPrivacyPolicyPageUrl()
|
366 |
{
|
367 |
-
$
|
|
|
368 |
$policyPageurl = get_permalink($policyPageId);
|
369 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
370 |
$policyPageurl = apply_filters( 'gdpr_custom_policy_link',$policyPageurl);
|
13 |
{
|
14 |
public function supportUrl($url = '')
|
15 |
{
|
16 |
+
global $gdpr;
|
17 |
+
return $gdpr->HelpUrl . $url;
|
18 |
}
|
19 |
|
20 |
/**
|
315 |
*/
|
316 |
public function getDataProtectionAuthorityInfo($countryCode = null)
|
317 |
{
|
318 |
+
global $gdpr;
|
319 |
+
|
320 |
if (!$countryCode) {
|
321 |
+
$countryCode = $gdpr->Options->get('company_location');
|
322 |
}
|
323 |
|
324 |
+
$dpaData = require($gdpr->PluginPath . 'assets/data-protection-authorities.php');
|
325 |
|
326 |
if (isset($dpaData[$countryCode])) {
|
327 |
return $dpaData[$countryCode];
|
335 |
*/
|
336 |
public function getDataProtectionAuthorities()
|
337 |
{
|
338 |
+
global $gdpr;
|
339 |
+
return require($gdpr->PluginPath . 'assets/data-protection-authorities.php');
|
340 |
}
|
341 |
|
342 |
public function getAdminUrl($suffix = '')
|
356 |
|
357 |
public function getPrivacyToolsPageUrl()
|
358 |
{
|
359 |
+
global $gdpr;
|
360 |
+
if($gdpr->Options->get('custom_tools_page')){
|
361 |
+
$privacyToolsUrl = $gdpr->Options->get('custom_tools_page');
|
362 |
return $privacyToolsUrl;
|
363 |
}else{
|
364 |
+
$toolsPageId = $gdpr->Options->get('tools_page');
|
365 |
return $toolsPageId ? get_permalink($toolsPageId) : '';
|
366 |
}
|
367 |
|
369 |
|
370 |
public function getPrivacyPolicyPageUrl()
|
371 |
{
|
372 |
+
global $gdpr;
|
373 |
+
$policyPageId = $gdpr->Options->get('policy_page');
|
374 |
$policyPageurl = get_permalink($policyPageId);
|
375 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
376 |
$policyPageurl = apply_filters( 'gdpr_custom_policy_link',$policyPageurl);
|
src/Installer/AdminInstallerNotice.php
CHANGED
@@ -9,7 +9,7 @@ class AdminInstallerNotice extends AdminNotice
|
|
9 |
public function render()
|
10 |
{
|
11 |
if (!$this->template) {
|
12 |
-
|
13 |
}
|
14 |
|
15 |
echo gdpr('view')->render('admin/notices/header-step');
|
9 |
public function render()
|
10 |
{
|
11 |
if (!$this->template) {
|
12 |
+
return;
|
13 |
}
|
14 |
|
15 |
echo gdpr('view')->render('admin/notices/header-step');
|
src/Installer/Installer.php
CHANGED
@@ -62,9 +62,6 @@ class Installer
|
|
62 |
if(!$this->isPrivcySafeNotified()) {
|
63 |
$this->run_privacysafe_promo();
|
64 |
}
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
}
|
69 |
|
70 |
/**
|
@@ -113,7 +110,8 @@ class Installer
|
|
113 |
*/
|
114 |
public function maybeDisplayDisclaimer()
|
115 |
{
|
116 |
-
|
|
|
117 |
$acceptUrl = add_query_arg([
|
118 |
'gdpr_action' => 'accept_disclaimer',
|
119 |
'gdpr_nonce' => wp_create_nonce('gdpr/admin/action/accept_disclaimer'),
|
@@ -128,7 +126,8 @@ class Installer
|
|
128 |
*/
|
129 |
public function acceptDisclaimer()
|
130 |
{
|
131 |
-
gdpr
|
|
|
132 |
wp_safe_redirect(gdpr('helpers')->getAdminUrl());
|
133 |
exit;
|
134 |
}
|
@@ -169,9 +168,10 @@ class Installer
|
|
169 |
*/
|
170 |
public function restartWizard()
|
171 |
{
|
172 |
-
gdpr
|
173 |
-
gdpr
|
174 |
-
gdpr
|
|
|
175 |
|
176 |
wp_safe_redirect(self_admin_url());
|
177 |
exit;
|
@@ -217,7 +217,8 @@ class Installer
|
|
217 |
*/
|
218 |
protected function isInstalled()
|
219 |
{
|
220 |
-
|
|
|
221 |
}
|
222 |
/**
|
223 |
* Check if the Privacy Safe notice is already ran
|
@@ -226,7 +227,8 @@ class Installer
|
|
226 |
*/
|
227 |
protected function isPrivcySafeNotified()
|
228 |
{
|
229 |
-
|
|
|
230 |
}
|
231 |
|
232 |
/**
|
@@ -234,7 +236,8 @@ class Installer
|
|
234 |
*/
|
235 |
public function getCurrentStepSlug()
|
236 |
{
|
237 |
-
|
|
|
238 |
}
|
239 |
|
240 |
/**
|
@@ -242,6 +245,7 @@ class Installer
|
|
242 |
*/
|
243 |
protected function displayWelcomeNotice()
|
244 |
{
|
|
|
245 |
// Make sure we display the notice only to admins
|
246 |
if (!current_user_can(apply_filters('gdpr/capability', 'manage_options'))) {
|
247 |
return;
|
@@ -269,12 +273,13 @@ class Installer
|
|
269 |
*
|
270 |
*/
|
271 |
public function run_privacysafe_promo() {
|
272 |
-
|
|
|
273 |
'gdpr_action' => 'skip_notice',
|
274 |
'gdpr_nonce' => wp_create_nonce("gdpr/admin/action/skip_notice"),
|
275 |
]);
|
276 |
// Make sure we display the notice only to admins
|
277 |
-
|
278 |
'installer/privacy-safe-notice',
|
279 |
compact('skipNoticeUrl')
|
280 |
);
|
@@ -287,6 +292,7 @@ class Installer
|
|
287 |
*/
|
288 |
protected function displayContinueNotice($url)
|
289 |
{
|
|
|
290 |
// Make sure we display the notice only to admins
|
291 |
if (!current_user_can(apply_filters('gdpr/capability', 'manage_options'))) {
|
292 |
return;
|
@@ -305,13 +311,14 @@ class Installer
|
|
305 |
*/
|
306 |
public function autoInstall()
|
307 |
{
|
|
|
308 |
$policyPageId = wp_insert_post([
|
309 |
'post_title' => __('Privacy Policy', 'gdpr-framework'),
|
310 |
'post_type' => 'page',
|
311 |
'post_status' => 'publish',
|
312 |
]);
|
313 |
|
314 |
-
gdpr
|
315 |
|
316 |
$toolsPageId = wp_insert_post([
|
317 |
'post_content' => '<!-- wp:shortcode -->[gdpr_privacy_tools]<!-- /wp:shortcode -->',
|
@@ -319,14 +326,14 @@ class Installer
|
|
319 |
'post_type' => 'page',
|
320 |
'post_status' => 'publish',
|
321 |
]);
|
322 |
-
gdpr
|
323 |
|
324 |
// Woocommerce compatibility - automatically add their terms page
|
325 |
if (get_option('woocommerce_terms_page_id')) {
|
326 |
-
gdpr
|
327 |
}
|
328 |
|
329 |
-
gdpr
|
330 |
wp_safe_redirect(gdpr('helpers')->getAdminUrl('&gdpr-tab=privacy-policy&gdpr-notice=autoinstall'));
|
331 |
exit;
|
332 |
}
|
@@ -336,7 +343,8 @@ class Installer
|
|
336 |
*/
|
337 |
public function skipInstall()
|
338 |
{
|
339 |
-
gdpr
|
|
|
340 |
wp_safe_redirect(gdpr('helpers')->getAdminUrl());
|
341 |
exit;
|
342 |
}
|
@@ -345,7 +353,8 @@ class Installer
|
|
345 |
*/
|
346 |
public function skipNotice()
|
347 |
{
|
348 |
-
gdpr
|
|
|
349 |
wp_safe_redirect(gdpr('helpers')->getAdminUrl());
|
350 |
exit;
|
351 |
}
|
62 |
if(!$this->isPrivcySafeNotified()) {
|
63 |
$this->run_privacysafe_promo();
|
64 |
}
|
|
|
|
|
|
|
65 |
}
|
66 |
|
67 |
/**
|
110 |
*/
|
111 |
public function maybeDisplayDisclaimer()
|
112 |
{
|
113 |
+
global $gdpr;
|
114 |
+
if (!$gdpr->Options->get('plugin_disclaimer_accepted') && (isset($_GET['page']) && 'privacy' === $_GET['page'])) {
|
115 |
$acceptUrl = add_query_arg([
|
116 |
'gdpr_action' => 'accept_disclaimer',
|
117 |
'gdpr_nonce' => wp_create_nonce('gdpr/admin/action/accept_disclaimer'),
|
126 |
*/
|
127 |
public function acceptDisclaimer()
|
128 |
{
|
129 |
+
global $gdpr;
|
130 |
+
$gdpr->Options->set('plugin_disclaimer_accepted', 'yes');
|
131 |
wp_safe_redirect(gdpr('helpers')->getAdminUrl());
|
132 |
exit;
|
133 |
}
|
168 |
*/
|
169 |
public function restartWizard()
|
170 |
{
|
171 |
+
global $gdpr;
|
172 |
+
$gdpr->Options->delete('installer_step');
|
173 |
+
$gdpr->Options->delete('is_installed');
|
174 |
+
$gdpr->Options->delete('is_privacysafe_notified');
|
175 |
|
176 |
wp_safe_redirect(self_admin_url());
|
177 |
exit;
|
217 |
*/
|
218 |
protected function isInstalled()
|
219 |
{
|
220 |
+
global $gdpr;
|
221 |
+
return $gdpr->Options->get('is_installed');
|
222 |
}
|
223 |
/**
|
224 |
* Check if the Privacy Safe notice is already ran
|
227 |
*/
|
228 |
protected function isPrivcySafeNotified()
|
229 |
{
|
230 |
+
global $gdpr;
|
231 |
+
return $gdpr->Options->get('is_privacysafe_notified');
|
232 |
}
|
233 |
|
234 |
/**
|
236 |
*/
|
237 |
public function getCurrentStepSlug()
|
238 |
{
|
239 |
+
global $gdpr;
|
240 |
+
return $gdpr->Options->get('installer_step');
|
241 |
}
|
242 |
|
243 |
/**
|
245 |
*/
|
246 |
protected function displayWelcomeNotice()
|
247 |
{
|
248 |
+
global $gdpr;
|
249 |
// Make sure we display the notice only to admins
|
250 |
if (!current_user_can(apply_filters('gdpr/capability', 'manage_options'))) {
|
251 |
return;
|
273 |
*
|
274 |
*/
|
275 |
public function run_privacysafe_promo() {
|
276 |
+
global $gdpr;
|
277 |
+
$skipNoticeUrl = add_query_arg([
|
278 |
'gdpr_action' => 'skip_notice',
|
279 |
'gdpr_nonce' => wp_create_nonce("gdpr/admin/action/skip_notice"),
|
280 |
]);
|
281 |
// Make sure we display the notice only to admins
|
282 |
+
$gdpr->PrivacySafe->add(
|
283 |
'installer/privacy-safe-notice',
|
284 |
compact('skipNoticeUrl')
|
285 |
);
|
292 |
*/
|
293 |
protected function displayContinueNotice($url)
|
294 |
{
|
295 |
+
global $gdpr;
|
296 |
// Make sure we display the notice only to admins
|
297 |
if (!current_user_can(apply_filters('gdpr/capability', 'manage_options'))) {
|
298 |
return;
|
311 |
*/
|
312 |
public function autoInstall()
|
313 |
{
|
314 |
+
global $gdpr;
|
315 |
$policyPageId = wp_insert_post([
|
316 |
'post_title' => __('Privacy Policy', 'gdpr-framework'),
|
317 |
'post_type' => 'page',
|
318 |
'post_status' => 'publish',
|
319 |
]);
|
320 |
|
321 |
+
$gdpr->Options->set('policy_page', $policyPageId);
|
322 |
|
323 |
$toolsPageId = wp_insert_post([
|
324 |
'post_content' => '<!-- wp:shortcode -->[gdpr_privacy_tools]<!-- /wp:shortcode -->',
|
326 |
'post_type' => 'page',
|
327 |
'post_status' => 'publish',
|
328 |
]);
|
329 |
+
$gdpr->Options->set('tools_page', $toolsPageId);
|
330 |
|
331 |
// Woocommerce compatibility - automatically add their terms page
|
332 |
if (get_option('woocommerce_terms_page_id')) {
|
333 |
+
$gdpr->Options->set('terms_page', get_option('woocommerce_terms_page_id'));
|
334 |
}
|
335 |
|
336 |
+
$gdpr->Options->set('is_installed', 'yes');
|
337 |
wp_safe_redirect(gdpr('helpers')->getAdminUrl('&gdpr-tab=privacy-policy&gdpr-notice=autoinstall'));
|
338 |
exit;
|
339 |
}
|
343 |
*/
|
344 |
public function skipInstall()
|
345 |
{
|
346 |
+
global $gdpr;
|
347 |
+
$gdpr->Options->set('is_installed', 'yes');
|
348 |
wp_safe_redirect(gdpr('helpers')->getAdminUrl());
|
349 |
exit;
|
350 |
}
|
353 |
*/
|
354 |
public function skipNotice()
|
355 |
{
|
356 |
+
global $gdpr;
|
357 |
+
$gdpr->Options->set('is_privacysafe_notified', 'yes');
|
358 |
wp_safe_redirect(gdpr('helpers')->getAdminUrl());
|
359 |
exit;
|
360 |
}
|
src/Installer/InstallerRouter.php
CHANGED
@@ -169,7 +169,8 @@ class InstallerRouter
|
|
169 |
*/
|
170 |
protected function setCurrentStep($slug)
|
171 |
{
|
172 |
-
|
|
|
173 |
}
|
174 |
|
175 |
/**
|
169 |
*/
|
170 |
protected function setCurrentStep($slug)
|
171 |
{
|
172 |
+
global $gdpr;
|
173 |
+
$gdpr->Options->set('installer_step', $slug);
|
174 |
}
|
175 |
|
176 |
/**
|
src/Installer/InstallerStep.php
CHANGED
@@ -80,6 +80,7 @@ abstract class InstallerStep
|
|
80 |
*/
|
81 |
protected function enqueue()
|
82 |
{
|
|
|
83 |
wp_enqueue_style('common');
|
84 |
wp_enqueue_style('buttons');
|
85 |
|
@@ -88,12 +89,12 @@ abstract class InstallerStep
|
|
88 |
*/
|
89 |
wp_enqueue_style(
|
90 |
'gdpr-installer',
|
91 |
-
gdpr
|
92 |
);
|
93 |
|
94 |
wp_enqueue_style(
|
95 |
'select2css',
|
96 |
-
gdpr
|
97 |
);
|
98 |
|
99 |
wp_enqueue_script('jquery');
|
@@ -104,12 +105,12 @@ abstract class InstallerStep
|
|
104 |
wp_enqueue_script('jquery-ui-tabs');
|
105 |
wp_enqueue_script(
|
106 |
'select2',
|
107 |
-
gdpr
|
108 |
['jquery']
|
109 |
);
|
110 |
wp_enqueue_script(
|
111 |
'conditional-show',
|
112 |
-
gdpr
|
113 |
['jquery']
|
114 |
);
|
115 |
|
@@ -119,7 +120,7 @@ abstract class InstallerStep
|
|
119 |
|
120 |
wp_enqueue_script(
|
121 |
'jquery-repeater',
|
122 |
-
gdpr
|
123 |
['jquery']
|
124 |
);
|
125 |
|
@@ -128,7 +129,7 @@ abstract class InstallerStep
|
|
128 |
*/
|
129 |
wp_enqueue_script(
|
130 |
'gdpr-installer',
|
131 |
-
gdpr
|
132 |
['jquery', 'select2']
|
133 |
);
|
134 |
}
|
@@ -171,7 +172,8 @@ abstract class InstallerStep
|
|
171 |
*/
|
172 |
public function getUrl()
|
173 |
{
|
174 |
-
|
|
|
175 |
}
|
176 |
|
177 |
/**
|
80 |
*/
|
81 |
protected function enqueue()
|
82 |
{
|
83 |
+
global $gdpr;
|
84 |
wp_enqueue_style('common');
|
85 |
wp_enqueue_style('buttons');
|
86 |
|
89 |
*/
|
90 |
wp_enqueue_style(
|
91 |
'gdpr-installer',
|
92 |
+
$gdpr->PluginUrl . 'assets/gdpr-installer.css'
|
93 |
);
|
94 |
|
95 |
wp_enqueue_style(
|
96 |
'select2css',
|
97 |
+
$gdpr->PluginUrl . 'assets/select2-4.0.5.css'
|
98 |
);
|
99 |
|
100 |
wp_enqueue_script('jquery');
|
105 |
wp_enqueue_script('jquery-ui-tabs');
|
106 |
wp_enqueue_script(
|
107 |
'select2',
|
108 |
+
$gdpr->PluginUrl . 'assets/select2-4.0.3.js',
|
109 |
['jquery']
|
110 |
);
|
111 |
wp_enqueue_script(
|
112 |
'conditional-show',
|
113 |
+
$gdpr->PluginUrl . 'assets/conditional-show.js',
|
114 |
['jquery']
|
115 |
);
|
116 |
|
120 |
|
121 |
wp_enqueue_script(
|
122 |
'jquery-repeater',
|
123 |
+
$gdpr->PluginUrl . 'assets/jquery.repeater.min.js',
|
124 |
['jquery']
|
125 |
);
|
126 |
|
129 |
*/
|
130 |
wp_enqueue_script(
|
131 |
'gdpr-installer',
|
132 |
+
$gdpr->PluginUrl . 'assets/gdpr-installer.js',
|
133 |
['jquery', 'select2']
|
134 |
);
|
135 |
}
|
172 |
*/
|
173 |
public function getUrl()
|
174 |
{
|
175 |
+
global $gdpr;
|
176 |
+
return $gdpr->InstallerWizardUrl . $this->slug;
|
177 |
}
|
178 |
|
179 |
/**
|
src/Installer/InstallerWizard.php
CHANGED
@@ -16,8 +16,6 @@ class InstallerWizard
|
|
16 |
*/
|
17 |
public function __construct()
|
18 |
{
|
19 |
-
$this->configure();
|
20 |
-
|
21 |
add_action('admin_menu', [$this, 'registerWizardPage']);
|
22 |
}
|
23 |
|
@@ -29,14 +27,6 @@ class InstallerWizard
|
|
29 |
add_dashboard_page( '', '', 'manage_options', 'gdpr-setup', '' );
|
30 |
}
|
31 |
|
32 |
-
/**
|
33 |
-
* Set up the configuration object
|
34 |
-
*/
|
35 |
-
protected function configure()
|
36 |
-
{
|
37 |
-
gdpr('config')->set('installer.wizardUrl', self_admin_url("index.php?page=gdpr-setup&gdpr-step="));
|
38 |
-
}
|
39 |
-
|
40 |
/**
|
41 |
* Check if we are already on the installer page
|
42 |
*
|
16 |
*/
|
17 |
public function __construct()
|
18 |
{
|
|
|
|
|
19 |
add_action('admin_menu', [$this, 'registerWizardPage']);
|
20 |
}
|
21 |
|
27 |
add_dashboard_page( '', '', 'manage_options', 'gdpr-setup', '' );
|
28 |
}
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
/**
|
31 |
* Check if we are already on the installer page
|
32 |
*
|
src/Installer/Steps/ConfigurationPages.php
CHANGED
@@ -17,7 +17,8 @@ class ConfigurationPages extends InstallerStep implements InstallerStepInterface
|
|
17 |
|
18 |
protected function renderContent()
|
19 |
{
|
20 |
-
$
|
|
|
21 |
$policyPageSelector = wp_dropdown_pages([
|
22 |
'name' => 'gdpr_policy_page',
|
23 |
'show_option_none' => _x('— Create a new page —', '(Admin)', 'gdpr-framework'),
|
@@ -27,7 +28,7 @@ class ConfigurationPages extends InstallerStep implements InstallerStepInterface
|
|
27 |
'class' => 'gdpr-select js-gdpr-select2',
|
28 |
]);
|
29 |
|
30 |
-
$privacyToolsPage = gdpr
|
31 |
$privacyToolsPageSelector = wp_dropdown_pages([
|
32 |
'name' => 'gdpr_tools_page',
|
33 |
'show_option_none' => _x('— Create a new page —', '(Admin)', 'gdpr-framework'),
|
@@ -50,11 +51,12 @@ class ConfigurationPages extends InstallerStep implements InstallerStepInterface
|
|
50 |
|
51 |
public function submit()
|
52 |
{
|
|
|
53 |
if (isset($_POST['gdpr_create_tools_page']) && 'yes' === $_POST['gdpr_create_tools_page']) {
|
54 |
$id = $this->createPrivacyToolsPage();
|
55 |
-
gdpr
|
56 |
} else {
|
57 |
-
gdpr
|
58 |
}
|
59 |
}
|
60 |
|
17 |
|
18 |
protected function renderContent()
|
19 |
{
|
20 |
+
global $gdpr;
|
21 |
+
$policyPage = $gdpr->Options->get('policy_page');
|
22 |
$policyPageSelector = wp_dropdown_pages([
|
23 |
'name' => 'gdpr_policy_page',
|
24 |
'show_option_none' => _x('— Create a new page —', '(Admin)', 'gdpr-framework'),
|
28 |
'class' => 'gdpr-select js-gdpr-select2',
|
29 |
]);
|
30 |
|
31 |
+
$privacyToolsPage = $gdpr->Options->get('tools_page');
|
32 |
$privacyToolsPageSelector = wp_dropdown_pages([
|
33 |
'name' => 'gdpr_tools_page',
|
34 |
'show_option_none' => _x('— Create a new page —', '(Admin)', 'gdpr-framework'),
|
51 |
|
52 |
public function submit()
|
53 |
{
|
54 |
+
global $gdpr;
|
55 |
if (isset($_POST['gdpr_create_tools_page']) && 'yes' === $_POST['gdpr_create_tools_page']) {
|
56 |
$id = $this->createPrivacyToolsPage();
|
57 |
+
$gdpr->Options->set('tools_page', $id);
|
58 |
} else {
|
59 |
+
$gdpr->Options->set('tools_page', $_POST['gdpr_tools_page']);
|
60 |
}
|
61 |
}
|
62 |
|
src/Installer/Steps/ConfigurationSettings.php
CHANGED
@@ -17,15 +17,16 @@ class ConfigurationSettings extends InstallerStep implements InstallerStepInterf
|
|
17 |
|
18 |
protected function renderContent()
|
19 |
{
|
20 |
-
$
|
21 |
-
$
|
22 |
-
$
|
|
|
23 |
|
24 |
-
$exportAction = gdpr
|
25 |
-
$exportActionEmail = gdpr
|
26 |
|
27 |
-
$reassign = gdpr
|
28 |
-
$reassignUser = gdpr
|
29 |
|
30 |
echo gdpr('view')->render(
|
31 |
$this->template,
|
@@ -43,28 +44,29 @@ class ConfigurationSettings extends InstallerStep implements InstallerStepInterf
|
|
43 |
|
44 |
public function submit()
|
45 |
{
|
|
|
46 |
if (isset($_POST['gdpr_export_action'])) {
|
47 |
-
gdpr
|
48 |
}
|
49 |
|
50 |
if (isset($_POST['gdpr_export_action_email'])) {
|
51 |
-
gdpr
|
52 |
}
|
53 |
|
54 |
if (isset($_POST['gdpr_delete_action'])) {
|
55 |
-
gdpr
|
56 |
}
|
57 |
|
58 |
if (isset($_POST['gdpr_delete_action_email'])) {
|
59 |
-
gdpr
|
60 |
}
|
61 |
|
62 |
if (isset($_POST['gdpr_delete_action_reassign'])) {
|
63 |
-
gdpr
|
64 |
}
|
65 |
|
66 |
if (isset($_POST['gdpr_delete_action_reassign_user'])) {
|
67 |
-
gdpr
|
68 |
}
|
69 |
}
|
70 |
}
|
17 |
|
18 |
protected function renderContent()
|
19 |
{
|
20 |
+
global $gdpr;
|
21 |
+
$privacyToolsPageUrl = get_permalink($gdpr->Options->get('tools_page'));
|
22 |
+
$deleteAction = $gdpr->Options->get('delete_action');
|
23 |
+
$deleteActionEmail = $gdpr->Options->get('delete_action_email');
|
24 |
|
25 |
+
$exportAction = $gdpr->Options->get('export_action');
|
26 |
+
$exportActionEmail = $gdpr->Options->get('export_action_email');
|
27 |
|
28 |
+
$reassign = $gdpr->Options->get('delete_action_reassign');
|
29 |
+
$reassignUser = $gdpr->Options->get('delete_action_reassign_user');
|
30 |
|
31 |
echo gdpr('view')->render(
|
32 |
$this->template,
|
44 |
|
45 |
public function submit()
|
46 |
{
|
47 |
+
global $gdpr;
|
48 |
if (isset($_POST['gdpr_export_action'])) {
|
49 |
+
$gdpr->Options->set('export_action', sanitize_text_field($_POST['gdpr_export_action']));
|
50 |
}
|
51 |
|
52 |
if (isset($_POST['gdpr_export_action_email'])) {
|
53 |
+
$gdpr->Options->set('export_action_email', sanitize_email($_POST['gdpr_export_action_email']));
|
54 |
}
|
55 |
|
56 |
if (isset($_POST['gdpr_delete_action'])) {
|
57 |
+
$gdpr->Options->set('delete_action', sanitize_text_field($_POST['gdpr_delete_action']));
|
58 |
}
|
59 |
|
60 |
if (isset($_POST['gdpr_delete_action_email'])) {
|
61 |
+
$gdpr->Options->set('delete_action_email', sanitize_email($_POST['gdpr_delete_action_email']));
|
62 |
}
|
63 |
|
64 |
if (isset($_POST['gdpr_delete_action_reassign'])) {
|
65 |
+
$gdpr->Options->set('delete_action_reassign', sanitize_text_field($_POST['gdpr_delete_action_reassign']));
|
66 |
}
|
67 |
|
68 |
if (isset($_POST['gdpr_delete_action_reassign_user'])) {
|
69 |
+
$gdpr->Options->set('delete_action_reassign_user', sanitize_text_field($_POST['gdpr_delete_action_reassign_user']));
|
70 |
}
|
71 |
}
|
72 |
}
|
src/Installer/Steps/Consent.php
CHANGED
@@ -17,9 +17,10 @@ class Consent extends InstallerStep implements InstallerStepInterface
|
|
17 |
|
18 |
protected function renderContent()
|
19 |
{
|
|
|
20 |
$isRegistrationOpen = get_option('users_can_register');
|
21 |
$isCommentsEnabled = class_exists('Disable_Comments') ? false : true;
|
22 |
-
$privacyToolsPageUrl = get_permalink(gdpr
|
23 |
$hasGravityForms = class_exists('\GFForms');
|
24 |
$hasCF7 = class_exists('\WPCF7');
|
25 |
$hasFrm = class_exists('\FrmHooksController');
|
17 |
|
18 |
protected function renderContent()
|
19 |
{
|
20 |
+
global $gdpr;
|
21 |
$isRegistrationOpen = get_option('users_can_register');
|
22 |
$isCommentsEnabled = class_exists('Disable_Comments') ? false : true;
|
23 |
+
$privacyToolsPageUrl = get_permalink($gdpr->Options->get('tools_page'));
|
24 |
$hasGravityForms = class_exists('\GFForms');
|
25 |
$hasCF7 = class_exists('\WPCF7');
|
26 |
$hasFrm = class_exists('\FrmHooksController');
|
src/Installer/Steps/Disclaimer.php
CHANGED
@@ -19,6 +19,7 @@ class Disclaimer extends InstallerStep implements InstallerStepInterface
|
|
19 |
|
20 |
public function submit()
|
21 |
{
|
22 |
-
gdpr
|
|
|
23 |
}
|
24 |
}
|
19 |
|
20 |
public function submit()
|
21 |
{
|
22 |
+
global $gdpr;
|
23 |
+
$gdpr->Options->set('plugin_disclaimer_accepted', 'yes');
|
24 |
}
|
25 |
}
|
src/Installer/Steps/Finish.php
CHANGED
@@ -17,7 +17,8 @@ class Finish extends InstallerStep implements InstallerStepInterface
|
|
17 |
|
18 |
public function submit()
|
19 |
{
|
20 |
-
gdpr
|
|
|
21 |
}
|
22 |
|
23 |
protected function renderFooter()
|
17 |
|
18 |
public function submit()
|
19 |
{
|
20 |
+
global $gdpr;
|
21 |
+
$gdpr->Options->set('is_installed', true);
|
22 |
}
|
23 |
|
24 |
protected function renderFooter()
|
src/Installer/Steps/Integrations.php
CHANGED
@@ -17,7 +17,8 @@ class Integrations extends InstallerStep implements InstallerStepInterface
|
|
17 |
|
18 |
protected function renderContent()
|
19 |
{
|
20 |
-
$
|
|
|
21 |
$currentTheme = gdpr('themes')->getCurrentThemeName();
|
22 |
$isThemeSupported = gdpr('themes')->isCurrentThemeSupported();
|
23 |
|
@@ -40,10 +41,11 @@ class Integrations extends InstallerStep implements InstallerStepInterface
|
|
40 |
|
41 |
public function submit()
|
42 |
{
|
|
|
43 |
if (isset($_POST['gdpr_enable_theme_compatibility']) && 'yes' === $_POST['gdpr_enable_theme_compatibility']) {
|
44 |
-
gdpr
|
45 |
} else {
|
46 |
-
gdpr
|
47 |
}
|
48 |
}
|
49 |
}
|
17 |
|
18 |
protected function renderContent()
|
19 |
{
|
20 |
+
global $gdpr;
|
21 |
+
$enableThemeCompatibility = $gdpr->Options->get('enable_theme_compatibility');
|
22 |
$currentTheme = gdpr('themes')->getCurrentThemeName();
|
23 |
$isThemeSupported = gdpr('themes')->isCurrentThemeSupported();
|
24 |
|
41 |
|
42 |
public function submit()
|
43 |
{
|
44 |
+
global $gdpr;
|
45 |
if (isset($_POST['gdpr_enable_theme_compatibility']) && 'yes' === $_POST['gdpr_enable_theme_compatibility']) {
|
46 |
+
$gdpr->Options->set('enable_theme_compatibility', true);
|
47 |
} else {
|
48 |
+
$gdpr->Options->set('enable_theme_compatibility', false);
|
49 |
}
|
50 |
}
|
51 |
}
|
src/Installer/Steps/PolicyContents.php
CHANGED
@@ -19,11 +19,12 @@ class PolicyContents extends InstallerStep implements InstallerStepInterface
|
|
19 |
|
20 |
protected function renderContent()
|
21 |
{
|
22 |
-
$
|
|
|
23 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
24 |
$policyUrl = apply_filters( 'gdpr_custom_policy_link',$policyUrl);
|
25 |
-
$editPolicyUrl = get_edit_post_link(gdpr
|
26 |
-
$policyGenerated = gdpr
|
27 |
|
28 |
echo gdpr('view')->render(
|
29 |
$this->template,
|
19 |
|
20 |
protected function renderContent()
|
21 |
{
|
22 |
+
global $gdpr;
|
23 |
+
$policyUrl = get_permalink($gdpr->Options->get('policy_page'));
|
24 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
25 |
$policyUrl = apply_filters( 'gdpr_custom_policy_link',$policyUrl);
|
26 |
+
$editPolicyUrl = get_edit_post_link($gdpr->Options->get('policy_page'));
|
27 |
+
$policyGenerated = $gdpr->Options->get('policy_generated');
|
28 |
|
29 |
echo gdpr('view')->render(
|
30 |
$this->template,
|
src/Installer/Steps/PolicySettings.php
CHANGED
@@ -17,7 +17,8 @@ class PolicySettings extends InstallerStep implements InstallerStepInterface
|
|
17 |
|
18 |
protected function renderContent()
|
19 |
{
|
20 |
-
$
|
|
|
21 |
$policyPageSelector = wp_dropdown_pages([
|
22 |
'name' => 'gdpr_policy_page',
|
23 |
'show_option_none' => _x('— Create a new page —', '(Admin)', 'gdpr-framework'),
|
@@ -27,9 +28,9 @@ class PolicySettings extends InstallerStep implements InstallerStepInterface
|
|
27 |
'class' => 'gdpr-select js-gdpr-select2',
|
28 |
]);
|
29 |
|
30 |
-
$hasTermsPage = gdpr
|
31 |
-
$termsPage = gdpr
|
32 |
-
$policy_page_url = gdpr
|
33 |
// Woo compatibility
|
34 |
if (!$termsPage && get_option('woocommerce_terms_page_id')) {
|
35 |
$hasTermsPage = 'yes';
|
@@ -51,27 +52,27 @@ class PolicySettings extends InstallerStep implements InstallerStepInterface
|
|
51 |
'echo' => false,
|
52 |
'class' => 'gdpr-select js-gdpr-select2',
|
53 |
]);
|
54 |
-
$termsPageUrl = gdpr
|
55 |
|
56 |
-
$companyName = gdpr
|
57 |
-
$companyLocation = gdpr
|
58 |
$countryOptions = gdpr('helpers')->getCountrySelectOptions($companyLocation);
|
59 |
-
$contactEmail = gdpr
|
60 |
-
gdpr
|
61 |
get_option('admin_email');
|
62 |
|
63 |
-
$representativeContactName = gdpr
|
64 |
-
$representativeContactEmail = gdpr
|
65 |
-
$representativeContactPhone = gdpr
|
66 |
|
67 |
-
$dpaWebsite = gdpr
|
68 |
-
$dpaEmail = gdpr
|
69 |
-
$dpaPhone = gdpr
|
70 |
$dpaData = json_encode(gdpr('helpers')->getDataProtectionAuthorities());
|
71 |
|
72 |
-
$hasDPO = gdpr
|
73 |
-
$dpoName = gdpr
|
74 |
-
$dpoEmail = gdpr
|
75 |
|
76 |
echo gdpr('view')->render(
|
77 |
$this->template,
|
@@ -117,15 +118,16 @@ class PolicySettings extends InstallerStep implements InstallerStepInterface
|
|
117 |
*/
|
118 |
|
119 |
public function submit()
|
120 |
-
{
|
|
|
121 |
/**
|
122 |
* Policy page
|
123 |
*/
|
124 |
if (isset($_POST['gdpr_create_policy_page']) && 'yes' === $_POST['gdpr_create_policy_page']) {
|
125 |
$id = $this->createPolicyPage();
|
126 |
-
gdpr
|
127 |
} else {
|
128 |
-
gdpr
|
129 |
}
|
130 |
|
131 |
|
@@ -133,9 +135,9 @@ class PolicySettings extends InstallerStep implements InstallerStepInterface
|
|
133 |
* Custom Policy page URL
|
134 |
*/
|
135 |
if (isset($_POST['gdpr_custom_policy_page']) && '' != $_POST['gdpr_custom_policy_page']) {
|
136 |
-
gdpr
|
137 |
} else {
|
138 |
-
gdpr
|
139 |
}
|
140 |
|
141 |
/**
|
@@ -143,52 +145,52 @@ class PolicySettings extends InstallerStep implements InstallerStepInterface
|
|
143 |
*/
|
144 |
if (isset($_POST['gdpr_generate_policy']) && 'yes' === $_POST['gdpr_generate_policy']) {
|
145 |
$this->generatePolicy();
|
146 |
-
gdpr
|
147 |
} else {
|
148 |
-
gdpr
|
149 |
}
|
150 |
|
151 |
/**
|
152 |
* Company information
|
153 |
*/
|
154 |
-
gdpr
|
155 |
-
gdpr
|
156 |
|
157 |
if (is_email($_POST['gdpr_contact_email'])) {
|
158 |
-
gdpr
|
159 |
}
|
160 |
|
161 |
/**
|
162 |
* Data Protection Officer
|
163 |
*/
|
164 |
if (isset($_POST['gdpr_has_dpo'])) {
|
165 |
-
gdpr
|
166 |
}
|
167 |
|
168 |
-
gdpr
|
169 |
|
170 |
if (is_email($_POST['gdpr_dpo_email'])) {
|
171 |
-
gdpr
|
172 |
}
|
173 |
|
174 |
/**
|
175 |
* Representative contact
|
176 |
*/
|
177 |
-
gdpr
|
178 |
-
gdpr
|
179 |
|
180 |
if (is_email($_POST['gdpr_representative_contact_email'])) {
|
181 |
-
gdpr
|
182 |
}
|
183 |
|
184 |
/**
|
185 |
* Data protection authority
|
186 |
*/
|
187 |
-
gdpr
|
188 |
-
gdpr
|
189 |
|
190 |
if (is_email($_POST['gdpr_dpa_email'])) {
|
191 |
-
gdpr
|
192 |
}
|
193 |
|
194 |
|
@@ -196,13 +198,13 @@ class PolicySettings extends InstallerStep implements InstallerStepInterface
|
|
196 |
* Terms page
|
197 |
*/
|
198 |
if (isset($_POST['gdpr_has_terms_page'])) {
|
199 |
-
gdpr
|
200 |
}
|
201 |
|
202 |
if (isset($_POST['gdpr_has_terms_page']) && 'yes' === $_POST['gdpr_has_terms_page'] && isset($_POST['gdpr_terms_page'])) {
|
203 |
-
gdpr
|
204 |
} else {
|
205 |
-
gdpr
|
206 |
}
|
207 |
}
|
208 |
|
@@ -218,8 +220,9 @@ class PolicySettings extends InstallerStep implements InstallerStepInterface
|
|
218 |
|
219 |
protected function generatePolicy()
|
220 |
{
|
|
|
221 |
wp_update_post([
|
222 |
-
'ID' => gdpr
|
223 |
'post_content' => gdpr('view')->render(
|
224 |
'policy/policy',
|
225 |
$this->getData()
|
@@ -229,30 +232,31 @@ class PolicySettings extends InstallerStep implements InstallerStepInterface
|
|
229 |
|
230 |
public function getData()
|
231 |
{
|
232 |
-
$
|
|
|
233 |
$date = date(get_option('date_format'));
|
234 |
|
235 |
return [
|
236 |
-
'companyName' => gdpr
|
237 |
'companyLocation' => $location,
|
238 |
-
'contactEmail' => gdpr
|
239 |
-
gdpr
|
240 |
get_option('admin_email'),
|
241 |
|
242 |
'hasRepresentative' => gdpr('helpers')->countryNeedsRepresentative($location),
|
243 |
-
'representativeContactName' => gdpr
|
244 |
-
'representativeContactEmail' => gdpr
|
245 |
-
'representativeContactPhone' => gdpr
|
246 |
|
247 |
-
'dpaWebsite' => gdpr
|
248 |
-
'dpaEmail' => gdpr
|
249 |
-
'dpaPhone' => gdpr
|
250 |
|
251 |
-
'hasDpo' => gdpr
|
252 |
-
'dpoName' => gdpr
|
253 |
-
'dpoEmail' => gdpr
|
254 |
|
255 |
-
'hasTerms' => gdpr
|
256 |
|
257 |
'date' => $date,
|
258 |
];
|
17 |
|
18 |
protected function renderContent()
|
19 |
{
|
20 |
+
global $gdpr;
|
21 |
+
$policyPage = $gdpr->Options->get('policy_page');
|
22 |
$policyPageSelector = wp_dropdown_pages([
|
23 |
'name' => 'gdpr_policy_page',
|
24 |
'show_option_none' => _x('— Create a new page —', '(Admin)', 'gdpr-framework'),
|
28 |
'class' => 'gdpr-select js-gdpr-select2',
|
29 |
]);
|
30 |
|
31 |
+
$hasTermsPage = $gdpr->Options->get('has_terms_page');
|
32 |
+
$termsPage = $gdpr->Options->get('terms_page');
|
33 |
+
$policy_page_url = $gdpr->Options->get('custom_policy_page');
|
34 |
// Woo compatibility
|
35 |
if (!$termsPage && get_option('woocommerce_terms_page_id')) {
|
36 |
$hasTermsPage = 'yes';
|
52 |
'echo' => false,
|
53 |
'class' => 'gdpr-select js-gdpr-select2',
|
54 |
]);
|
55 |
+
$termsPageUrl = $gdpr->Options->get('custom_terms_page');
|
56 |
|
57 |
+
$companyName = $gdpr->Options->get('company_name');
|
58 |
+
$companyLocation = $gdpr->Options->get('company_location');
|
59 |
$countryOptions = gdpr('helpers')->getCountrySelectOptions($companyLocation);
|
60 |
+
$contactEmail = $gdpr->Options->get('contact_email') ?
|
61 |
+
$gdpr->Options->get('contact_email') :
|
62 |
get_option('admin_email');
|
63 |
|
64 |
+
$representativeContactName = $gdpr->Options->get('representative_contact_name');
|
65 |
+
$representativeContactEmail = $gdpr->Options->get('representative_contact_email');
|
66 |
+
$representativeContactPhone = $gdpr->Options->get('representative_contact_phone');
|
67 |
|
68 |
+
$dpaWebsite = $gdpr->Options->get('dpa_website');
|
69 |
+
$dpaEmail = $gdpr->Options->get('dpa_email');
|
70 |
+
$dpaPhone = $gdpr->Options->get('dpa_phone');
|
71 |
$dpaData = json_encode(gdpr('helpers')->getDataProtectionAuthorities());
|
72 |
|
73 |
+
$hasDPO = $gdpr->Options->get('has_dpo');
|
74 |
+
$dpoName = $gdpr->Options->get('dpo_name');
|
75 |
+
$dpoEmail = $gdpr->Options->get('dpo_email');
|
76 |
|
77 |
echo gdpr('view')->render(
|
78 |
$this->template,
|
118 |
*/
|
119 |
|
120 |
public function submit()
|
121 |
+
{
|
122 |
+
global $gdpr;
|
123 |
/**
|
124 |
* Policy page
|
125 |
*/
|
126 |
if (isset($_POST['gdpr_create_policy_page']) && 'yes' === $_POST['gdpr_create_policy_page']) {
|
127 |
$id = $this->createPolicyPage();
|
128 |
+
$gdpr->Options->set('policy_page', $id);
|
129 |
} else {
|
130 |
+
$gdpr->Options->set('policy_page', sanitize_text_field($_POST['gdpr_policy_page']));
|
131 |
}
|
132 |
|
133 |
|
135 |
* Custom Policy page URL
|
136 |
*/
|
137 |
if (isset($_POST['gdpr_custom_policy_page']) && '' != $_POST['gdpr_custom_policy_page']) {
|
138 |
+
$gdpr->Options->set('custom_policy_page',sanitize_text_field($_POST['gdpr_custom_policy_page']));
|
139 |
} else {
|
140 |
+
$gdpr->Options->set('custom_policy_page', "");
|
141 |
}
|
142 |
|
143 |
/**
|
145 |
*/
|
146 |
if (isset($_POST['gdpr_generate_policy']) && 'yes' === $_POST['gdpr_generate_policy']) {
|
147 |
$this->generatePolicy();
|
148 |
+
$gdpr->Options->set('policy_generated', true);
|
149 |
} else {
|
150 |
+
$gdpr->Options->set('policy_generated', false);
|
151 |
}
|
152 |
|
153 |
/**
|
154 |
* Company information
|
155 |
*/
|
156 |
+
$gdpr->Options->set('company_name', sanitize_text_field($_POST['gdpr_company_name']));
|
157 |
+
$gdpr->Options->set('company_location', sanitize_text_field($_POST['gdpr_company_location']));
|
158 |
|
159 |
if (is_email($_POST['gdpr_contact_email'])) {
|
160 |
+
$gdpr->Options->set('contact_email', sanitize_email($_POST['gdpr_contact_email']));
|
161 |
}
|
162 |
|
163 |
/**
|
164 |
* Data Protection Officer
|
165 |
*/
|
166 |
if (isset($_POST['gdpr_has_dpo'])) {
|
167 |
+
$gdpr->Options->set('has_dpo', sanitize_text_field($_POST['gdpr_has_dpo']));
|
168 |
}
|
169 |
|
170 |
+
$gdpr->Options->set('dpo_name', sanitize_text_field($_POST['gdpr_dpo_name']));
|
171 |
|
172 |
if (is_email($_POST['gdpr_dpo_email'])) {
|
173 |
+
$gdpr->Options->set('dpo_email', sanitize_email($_POST['gdpr_dpo_email']));
|
174 |
}
|
175 |
|
176 |
/**
|
177 |
* Representative contact
|
178 |
*/
|
179 |
+
$gdpr->Options->set('representative_contact_name', sanitize_text_field($_POST['gdpr_representative_contact_name']));
|
180 |
+
$gdpr->Options->set('representative_contact_phone', sanitize_text_field($_POST['gdpr_representative_contact_phone']));
|
181 |
|
182 |
if (is_email($_POST['gdpr_representative_contact_email'])) {
|
183 |
+
$gdpr->Options->set('representative_contact_email', sanitize_email($_POST['gdpr_representative_contact_email']));
|
184 |
}
|
185 |
|
186 |
/**
|
187 |
* Data protection authority
|
188 |
*/
|
189 |
+
$gdpr->Options->set('dpa_website', sanitize_text_field($_POST['gdpr_dpa_website']));
|
190 |
+
$gdpr->Options->set('dpa_phone', sanitize_text_field($_POST['gdpr_dpa_phone']));
|
191 |
|
192 |
if (is_email($_POST['gdpr_dpa_email'])) {
|
193 |
+
$gdpr->Options->set('dpa_email', sanitize_email($_POST['gdpr_dpa_email']));
|
194 |
}
|
195 |
|
196 |
|
198 |
* Terms page
|
199 |
*/
|
200 |
if (isset($_POST['gdpr_has_terms_page'])) {
|
201 |
+
$gdpr->Options->set('has_terms_page', sanitize_text_field($_POST['gdpr_has_terms_page']));
|
202 |
}
|
203 |
|
204 |
if (isset($_POST['gdpr_has_terms_page']) && 'yes' === $_POST['gdpr_has_terms_page'] && isset($_POST['gdpr_terms_page'])) {
|
205 |
+
$gdpr->Options->set('terms_page', sanitize_text_field($_POST['gdpr_terms_page']));
|
206 |
} else {
|
207 |
+
$gdpr->Options->delete('terms_page');
|
208 |
}
|
209 |
}
|
210 |
|
220 |
|
221 |
protected function generatePolicy()
|
222 |
{
|
223 |
+
global $gdpr;
|
224 |
wp_update_post([
|
225 |
+
'ID' => $gdpr->Options->get('policy_page'),
|
226 |
'post_content' => gdpr('view')->render(
|
227 |
'policy/policy',
|
228 |
$this->getData()
|
232 |
|
233 |
public function getData()
|
234 |
{
|
235 |
+
global $gdpr;
|
236 |
+
$location = $gdpr->Options->get('company_location');
|
237 |
$date = date(get_option('date_format'));
|
238 |
|
239 |
return [
|
240 |
+
'companyName' => $gdpr->Options->get('company_name'),
|
241 |
'companyLocation' => $location,
|
242 |
+
'contactEmail' => $gdpr->Options->get('contact_email') ?
|
243 |
+
$gdpr->Options->get('contact_email') :
|
244 |
get_option('admin_email'),
|
245 |
|
246 |
'hasRepresentative' => gdpr('helpers')->countryNeedsRepresentative($location),
|
247 |
+
'representativeContactName' => $gdpr->Options->get('representative_contact_name'),
|
248 |
+
'representativeContactEmail' => $gdpr->Options->get('representative_contact_email'),
|
249 |
+
'representativeContactPhone' => $gdpr->Options->get('representative_contact_phone'),
|
250 |
|
251 |
+
'dpaWebsite' => $gdpr->Options->get('dpa_website'),
|
252 |
+
'dpaEmail' => $gdpr->Options->get('dpa_email'),
|
253 |
+
'dpaPhone' => $gdpr->Options->get('dpa_phone'),
|
254 |
|
255 |
+
'hasDpo' => $gdpr->Options->get('has_dpo'),
|
256 |
+
'dpoName' => $gdpr->Options->get('dpo_name'),
|
257 |
+
'dpoEmail' => $gdpr->Options->get('dpo_email'),
|
258 |
|
259 |
+
'hasTerms' => $gdpr->Options->get('terms_page'),
|
260 |
|
261 |
'date' => $date,
|
262 |
];
|
src/Modules/ContactForm7/ContactForm7.php
CHANGED
@@ -52,7 +52,8 @@ class ContactForm7
|
|
52 |
|
53 |
public function renderPrivacyTag()
|
54 |
{
|
55 |
-
$
|
|
|
56 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
57 |
$privacyPolicyUrl = apply_filters( 'gdpr_custom_policy_link',$privacyPolicyUrl);
|
58 |
return gdpr('view')->render(
|
52 |
|
53 |
public function renderPrivacyTag()
|
54 |
{
|
55 |
+
global $gdpr;
|
56 |
+
$privacyPolicyUrl = get_permalink($gdpr->Options->get('policy_page'));
|
57 |
add_filter( 'gdpr_custom_policy_link', 'gdprfPrivacyPolicyurl' );
|
58 |
$privacyPolicyUrl = apply_filters( 'gdpr_custom_policy_link',$privacyPolicyUrl);
|
59 |
return gdpr('view')->render(
|
src/Modules/EddGdpr/EddGdpr.php
CHANGED
@@ -11,10 +11,11 @@ include_once(EDD_PLUGIN_DIR . 'includes/privacy-functions.php');
|
|
11 |
class EddGdpr
|
12 |
{
|
13 |
public function __construct(DataSubjectManager $dataSubjectManager, ConsentManager $consentManager)
|
14 |
-
{
|
|
|
15 |
$this->dataSubjectManager = $dataSubjectManager;
|
16 |
-
$this->consentManager = $consentManager;
|
17 |
-
if (
|
18 |
{
|
19 |
return;
|
20 |
}
|
11 |
class EddGdpr
|
12 |
{
|
13 |
public function __construct(DataSubjectManager $dataSubjectManager, ConsentManager $consentManager)
|
14 |
+
{
|
15 |
+
global $gdpr;
|
16 |
$this->dataSubjectManager = $dataSubjectManager;
|
17 |
+
$this->consentManager = $consentManager;
|
18 |
+
if (!$gdpr->Options->get('enable_edd_compatibility'))
|
19 |
{
|
20 |
return;
|
21 |
}
|
src/Modules/NewsletterGdpr/NewsletterGdpr.php
CHANGED
@@ -11,6 +11,8 @@ if(file_exists(dirname( ES_PLUGIN_FILE ) . '/includes/db/class-es-db-contacts.ph
|
|
11 |
include_once dirname( ES_PLUGIN_FILE ) . '/lite/includes/db/class-es-db-contacts.php';
|
12 |
}
|
13 |
|
|
|
|
|
14 |
class NewsletterGdpr
|
15 |
{
|
16 |
public function __construct(DataSubjectManager $dataSubjectManager, ConsentManager $consentManager)
|
@@ -32,8 +34,9 @@ class NewsletterGdpr
|
|
32 |
}
|
33 |
|
34 |
public function newsletter_checkbox_consent($data)
|
35 |
-
{
|
36 |
-
$
|
|
|
37 |
|
38 |
$policyPageUrl = get_permalink($policyPage);
|
39 |
|
11 |
include_once dirname( ES_PLUGIN_FILE ) . '/lite/includes/db/class-es-db-contacts.php';
|
12 |
}
|
13 |
|
14 |
+
// Support plugin name: Email Subscribers & Newsletters
|
15 |
+
|
16 |
class NewsletterGdpr
|
17 |
{
|
18 |
public function __construct(DataSubjectManager $dataSubjectManager, ConsentManager $consentManager)
|
34 |
}
|
35 |
|
36 |
public function newsletter_checkbox_consent($data)
|
37 |
+
{
|
38 |
+
global $gdpr;
|
39 |
+
$policyPage = $gdpr->Options->get('policy_page');
|
40 |
|
41 |
$policyPageUrl = get_permalink($policyPage);
|
42 |
|
src/Modules/WPML/WPML.php
CHANGED
@@ -104,13 +104,14 @@ class WPML
|
|
104 |
|
105 |
public function saveConsentTypes($newConsentTypes)
|
106 |
{
|
|
|
107 |
if (!defined('ICL_LANGUAGE_CODE')) {
|
108 |
return $newConsentTypes;
|
109 |
}
|
110 |
|
111 |
$code = (string)ICL_LANGUAGE_CODE;
|
112 |
$translatedConsentTypes = [];
|
113 |
-
$currentConsentTypes = gdpr
|
114 |
|
115 |
if (count($newConsentTypes)) {
|
116 |
foreach ($newConsentTypes as &$newConsentType) {
|
104 |
|
105 |
public function saveConsentTypes($newConsentTypes)
|
106 |
{
|
107 |
+
global $gdpr;
|
108 |
if (!defined('ICL_LANGUAGE_CODE')) {
|
109 |
return $newConsentTypes;
|
110 |
}
|
111 |
|
112 |
$code = (string)ICL_LANGUAGE_CODE;
|
113 |
$translatedConsentTypes = [];
|
114 |
+
$currentConsentTypes = $gdpr->Options->get('consent_types', null, false);
|
115 |
|
116 |
if (count($newConsentTypes)) {
|
117 |
foreach ($newConsentTypes as &$newConsentType) {
|
src/Modules/WooCommerceGdpr/WooCommerceGdpr.php
CHANGED
@@ -9,11 +9,12 @@ include_once(WC_ABSPATH . 'includes/class-wc-privacy-erasers.php');
|
|
9 |
class WooCommerceGdpr
|
10 |
{
|
11 |
public function __construct(DataSubjectManager $dataSubjectManager, ConsentManager $consentManager)
|
12 |
-
{
|
|
|
13 |
$this->dataSubjectManager = $dataSubjectManager;
|
14 |
$this->consentManager = $consentManager;
|
15 |
|
16 |
-
if (
|
17 |
{
|
18 |
return;
|
19 |
}
|
@@ -24,12 +25,12 @@ class WooCommerceGdpr
|
|
24 |
add_filter('gdpr/data-subject/data', [$this, 'getWoocommerceExportData'], 20, 2);
|
25 |
add_action('gdpr/data-subject/delete', [$this, 'deleteWoocommerceEntries']);
|
26 |
add_action('gdpr/data-subject/anonymize', [$this, 'anonymizeWoocommerceEntries']);
|
27 |
-
if (
|
28 |
{
|
29 |
add_action('woocommerce_review_order_before_submit', [$this, 'gdpr_woo_add_checkout_privacy_policy'], 9);
|
30 |
add_action('woocommerce_checkout_process', [$this, 'gdpr_woo_not_approved_privacy']);
|
31 |
}
|
32 |
-
if (
|
33 |
{
|
34 |
add_action( 'woocommerce_register_form', [$this,'gdpr_woo_add_checkout_privacy_policy'], 11 );
|
35 |
add_filter( 'woocommerce_registration_errors', [$this,'gdprf_validate_privacy_registration'], 10, 3 );
|
@@ -129,8 +130,9 @@ class WooCommerceGdpr
|
|
129 |
* Add checkout FGDPR content
|
130 |
*/
|
131 |
public function gdpr_woo_add_checkout_privacy_policy()
|
132 |
-
{
|
133 |
-
$
|
|
|
134 |
$policyPageUrl = get_permalink($policyPage);
|
135 |
if(isset($policyPageUrl) && $policyPage != "0")
|
136 |
{
|
@@ -152,8 +154,9 @@ class WooCommerceGdpr
|
|
152 |
* Track consent and check for Privacy Policy consent.
|
153 |
*/
|
154 |
public function gdpr_woo_not_approved_privacy()
|
155 |
-
{
|
156 |
-
$
|
|
|
157 |
$policyPageUrl = get_permalink($policyPage);
|
158 |
if ( ! (int) isset( $_POST['gdpr_woo_consent'] ) )
|
159 |
{
|
9 |
class WooCommerceGdpr
|
10 |
{
|
11 |
public function __construct(DataSubjectManager $dataSubjectManager, ConsentManager $consentManager)
|
12 |
+
{
|
13 |
+
global $gdpr;
|
14 |
$this->dataSubjectManager = $dataSubjectManager;
|
15 |
$this->consentManager = $consentManager;
|
16 |
|
17 |
+
if (!$gdpr->Options->get('enable_woo_compatibility'))
|
18 |
{
|
19 |
return;
|
20 |
}
|
25 |
add_filter('gdpr/data-subject/data', [$this, 'getWoocommerceExportData'], 20, 2);
|
26 |
add_action('gdpr/data-subject/delete', [$this, 'deleteWoocommerceEntries']);
|
27 |
add_action('gdpr/data-subject/anonymize', [$this, 'anonymizeWoocommerceEntries']);
|
28 |
+
if (!$gdpr->Options->get('disable_checkbox_woo_compatibility'))
|
29 |
{
|
30 |
add_action('woocommerce_review_order_before_submit', [$this, 'gdpr_woo_add_checkout_privacy_policy'], 9);
|
31 |
add_action('woocommerce_checkout_process', [$this, 'gdpr_woo_not_approved_privacy']);
|
32 |
}
|
33 |
+
if (!$gdpr->Options->get('disable_register_checkbox_woo_compatibility'))
|
34 |
{
|
35 |
add_action( 'woocommerce_register_form', [$this,'gdpr_woo_add_checkout_privacy_policy'], 11 );
|
36 |
add_filter( 'woocommerce_registration_errors', [$this,'gdprf_validate_privacy_registration'], 10, 3 );
|
130 |
* Add checkout FGDPR content
|
131 |
*/
|
132 |
public function gdpr_woo_add_checkout_privacy_policy()
|
133 |
+
{
|
134 |
+
global $gdpr;
|
135 |
+
$policyPage = $gdpr->Options->get('policy_page');
|
136 |
$policyPageUrl = get_permalink($policyPage);
|
137 |
if(isset($policyPageUrl) && $policyPage != "0")
|
138 |
{
|
154 |
* Track consent and check for Privacy Policy consent.
|
155 |
*/
|
156 |
public function gdpr_woo_not_approved_privacy()
|
157 |
+
{
|
158 |
+
global $gdpr;
|
159 |
+
$policyPage = $gdpr->Options->get('policy_page');
|
160 |
$policyPageUrl = get_permalink($policyPage);
|
161 |
if ( ! (int) isset( $_POST['gdpr_woo_consent'] ) )
|
162 |
{
|
src/Setup.php
DELETED
@@ -1,126 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Codelight\GDPR;
|
4 |
-
|
5 |
-
use Codelight\GDPR\Admin\AdminTab;
|
6 |
-
use Codelight\GDPR\Components\Consent\ConsentManager;
|
7 |
-
use Codelight\GDPR\Components\PrivacyToolsPage\PrivacyToolsPage;
|
8 |
-
use Codelight\GDPR\Components\PrivacyPolicy\PrivacyPolicy;
|
9 |
-
use Codelight\GDPR\Components\AdvancedIntegration\AdvancedIntegration;
|
10 |
-
use Codelight\GDPR\Components\PrivacyManager\PrivacyManager;
|
11 |
-
use Codelight\GDPR\Components\PrivacySafe\PrivacySafe;
|
12 |
-
use Codelight\GDPR\Components\DoNotSell\DoNotSell;
|
13 |
-
use Codelight\GDPR\Components\CookiePopup\CookiePopup;
|
14 |
-
use Codelight\GDPR\Components\Support\Support;
|
15 |
-
use Codelight\GDPR\Components\WordpressComments\WordpressComments;
|
16 |
-
use Codelight\GDPR\DataSubject\DataExporter;
|
17 |
-
use Codelight\GDPR\DataSubject\DataSubjectAdmin;
|
18 |
-
use Codelight\GDPR\DataSubject\DataSubjectIdentificator;
|
19 |
-
use Codelight\GDPR\DataSubject\DataSubjectManager;
|
20 |
-
use Codelight\GDPR\Modules\ContactForm7\ContactForm7;
|
21 |
-
use Codelight\GDPR\Modules\WooCommerceGdpr\WooCommerceGdpr;
|
22 |
-
use Codelight\GDPR\Modules\NewsletterGdpr\NewsletterGdpr;
|
23 |
-
use Codelight\GDPR\Modules\EddGdpr\EddGdpr;
|
24 |
-
use Codelight\GDPR\Components\Themes\Themes;
|
25 |
-
use Codelight\GDPR\Components\WordpressUser\WordpressUser;
|
26 |
-
use Codelight\GDPR\Modules\ContactForm7\Flamingo;
|
27 |
-
use Codelight\GDPR\Modules\WPML\WPML;
|
28 |
-
use Codelight\GDPR\Options\Options;
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Instantiate components
|
32 |
-
*
|
33 |
-
* Class Setup
|
34 |
-
* @package Codelight\GDPR
|
35 |
-
*/
|
36 |
-
class Setup
|
37 |
-
{
|
38 |
-
/**
|
39 |
-
* Setup constructor.
|
40 |
-
*/
|
41 |
-
public function __construct()
|
42 |
-
{
|
43 |
-
$this->registerComponents();
|
44 |
-
$this->runComponents();
|
45 |
-
|
46 |
-
add_action('init', function() {
|
47 |
-
|
48 |
-
if (!is_admin()) {
|
49 |
-
return;
|
50 |
-
}
|
51 |
-
|
52 |
-
gdpr()->singleton(SetupAdmin::class);
|
53 |
-
gdpr(SetupAdmin::class);
|
54 |
-
}, 0);
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Register required components in the container
|
59 |
-
*/
|
60 |
-
protected function registerComponents()
|
61 |
-
{
|
62 |
-
gdpr()->bind(Router::class);
|
63 |
-
gdpr()->bind(DataExporter::class);
|
64 |
-
|
65 |
-
gdpr()->singleton(PrivacyToolsPage::class);
|
66 |
-
|
67 |
-
gdpr()->singleton(AdminTab::class);
|
68 |
-
gdpr()->singleton(DataSubjectManager::class);
|
69 |
-
gdpr()->singleton(DataSubjectIdentificator::class);
|
70 |
-
gdpr()->singleton(View::class);
|
71 |
-
gdpr()->singleton(Options::class);
|
72 |
-
gdpr()->singleton(ConsentManager::class);
|
73 |
-
gdpr()->singleton(Helpers::class);
|
74 |
-
gdpr()->singleton(Themes::class);
|
75 |
-
|
76 |
-
gdpr()->alias(View::class, 'view');
|
77 |
-
gdpr()->alias(Options::class, 'options');
|
78 |
-
gdpr()->alias(ConsentManager::class, 'consent');
|
79 |
-
gdpr()->alias(Helpers::class, 'helpers');
|
80 |
-
gdpr()->alias(Themes::class, 'themes');
|
81 |
-
gdpr()->alias(DataSubjectManager::class, 'data-subject');
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Check which components should be ran and run them
|
86 |
-
*/
|
87 |
-
protected function runComponents()
|
88 |
-
{
|
89 |
-
gdpr()->make(WPML::class);
|
90 |
-
gdpr()->make(Router::class);
|
91 |
-
gdpr()->make(DataSubjectIdentificator::class);
|
92 |
-
gdpr()->make(DataSubjectAdmin::class);
|
93 |
-
gdpr()->make(PrivacyToolsPage::class);
|
94 |
-
gdpr()->make(PrivacyPolicy::class);
|
95 |
-
gdpr()->make(CookiePopup::class);
|
96 |
-
gdpr()->make(AdvancedIntegration::class);
|
97 |
-
gdpr()->make(PrivacyManager::class);
|
98 |
-
gdpr()->make(PrivacySafe::class );
|
99 |
-
gdpr()->make(DoNotSell::class );
|
100 |
-
gdpr()->make(WordpressComments::class);
|
101 |
-
gdpr()->make(WordpressUser::class);
|
102 |
-
gdpr()->make(Support::class);
|
103 |
-
|
104 |
-
// Integrations
|
105 |
-
gdpr()->make(Themes::class);
|
106 |
-
|
107 |
-
if (defined('WPCF7_VERSION')) {
|
108 |
-
gdpr()->make(ContactForm7::class);
|
109 |
-
}
|
110 |
-
|
111 |
-
if (defined('FLAMINGO_VERSION')) {
|
112 |
-
gdpr()->make(Flamingo::class);
|
113 |
-
}
|
114 |
-
|
115 |
-
if ( defined('WC_VERSION') ) {
|
116 |
-
gdpr()->make(WooCommerceGdpr::class);
|
117 |
-
}
|
118 |
-
|
119 |
-
if ( defined('EDD_VERSION') ) {
|
120 |
-
gdpr()->make(EddGdpr::class);
|
121 |
-
}
|
122 |
-
if ( defined('ES_PLUGIN_VERSION') ) {
|
123 |
-
gdpr()->make(NewsletterGdpr::class);
|
124 |
-
}
|
125 |
-
}
|
126 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/SetupAdmin.php
CHANGED
@@ -8,9 +8,16 @@ use Codelight\GDPR\Admin\Modal;
|
|
8 |
use Codelight\GDPR\Admin\WordpressAdmin;
|
9 |
use Codelight\GDPR\Admin\WordpressAdminPage;
|
10 |
use Codelight\GDPR\Components\Consent\ConsentAdmin;
|
|
|
11 |
use Codelight\GDPR\Installer\Installer;
|
12 |
use Codelight\GDPR\Installer\AdminInstallerNotice;
|
13 |
use Codelight\GDPR\Admin\AdminPrivacySafe;
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
/**
|
16 |
* Register and set up admin components.
|
@@ -22,9 +29,6 @@ use Codelight\GDPR\Admin\AdminPrivacySafe;
|
|
22 |
*/
|
23 |
class SetupAdmin
|
24 |
{
|
25 |
-
/**
|
26 |
-
* SetupAdmin constructor.
|
27 |
-
*/
|
28 |
public function __construct()
|
29 |
{
|
30 |
$this->registerComponents();
|
@@ -36,29 +40,28 @@ class SetupAdmin
|
|
36 |
*/
|
37 |
protected function registerComponents()
|
38 |
{
|
39 |
-
gdpr
|
40 |
-
gdpr
|
41 |
-
gdpr
|
42 |
-
|
43 |
-
|
44 |
-
gdpr
|
45 |
-
gdpr
|
46 |
-
gdpr
|
47 |
-
gdpr()->alias(AdminPrivacySafe::class, 'privacy-safe');
|
48 |
-
gdpr()->alias(Modal::class, 'admin-modal');
|
49 |
-
gdpr()->alias(WordpressAdminPage::class, 'admin-page');
|
50 |
-
|
51 |
-
gdpr()->bind(ConsentAdmin::class);
|
52 |
}
|
53 |
|
54 |
-
/**
|
55 |
-
* Run components
|
56 |
-
*/
|
57 |
protected function runComponents()
|
58 |
{
|
59 |
-
gdpr
|
60 |
-
gdpr
|
61 |
-
gdpr
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
}
|
64 |
}
|
8 |
use Codelight\GDPR\Admin\WordpressAdmin;
|
9 |
use Codelight\GDPR\Admin\WordpressAdminPage;
|
10 |
use Codelight\GDPR\Components\Consent\ConsentAdmin;
|
11 |
+
use Codelight\GDPR\Components\CookiePopup\CookiePopup;
|
12 |
use Codelight\GDPR\Installer\Installer;
|
13 |
use Codelight\GDPR\Installer\AdminInstallerNotice;
|
14 |
use Codelight\GDPR\Admin\AdminPrivacySafe;
|
15 |
+
use Codelight\GDPR\DataSubject\DataSubjectAdmin;
|
16 |
+
use Codelight\GDPR\Components\PrivacyPolicy\PrivacyPolicy;
|
17 |
+
use Codelight\GDPR\Components\DoNotSell\DoNotSell;
|
18 |
+
use Codelight\GDPR\Components\Support\Support;
|
19 |
+
use Codelight\GDPR\Components\AdvancedIntegration\AdvancedIntegration;
|
20 |
+
use Codelight\GDPR\Components\PrivacySafe\PrivacySafe;
|
21 |
|
22 |
/**
|
23 |
* Register and set up admin components.
|
29 |
*/
|
30 |
class SetupAdmin
|
31 |
{
|
|
|
|
|
|
|
32 |
public function __construct()
|
33 |
{
|
34 |
$this->registerComponents();
|
40 |
*/
|
41 |
protected function registerComponents()
|
42 |
{
|
43 |
+
global $gdpr;
|
44 |
+
$gdpr->AdminNotice = new AdminNotice();
|
45 |
+
$gdpr->AdminError = new AdminError();
|
46 |
+
$gdpr->AdminInstallerNotice = new AdminInstallerNotice();
|
47 |
+
$gdpr->PrivacySafe = new AdminPrivacySafe();
|
48 |
+
$gdpr->AdminModal = new Modal();
|
49 |
+
$gdpr->AdminPage = new WordpressAdminPage();
|
50 |
+
$gdpr->AdminTabGeneral = new Admin\AdminTabGeneral();
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
|
|
|
|
|
|
|
53 |
protected function runComponents()
|
54 |
{
|
55 |
+
global $gdpr;
|
56 |
+
new WordpressAdmin($gdpr->AdminPage);
|
57 |
+
new Installer($gdpr->AdminTabGeneral);
|
58 |
+
new CookiePopup();
|
59 |
+
new ConsentAdmin();
|
60 |
+
new DataSubjectAdmin();
|
61 |
+
new PrivacyPolicy();
|
62 |
+
new DoNotSell();
|
63 |
+
new Support();
|
64 |
+
new AdvancedIntegration();
|
65 |
+
new PrivacySafe();
|
66 |
}
|
67 |
}
|
src/Singleton.php
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Codelight\GDPR;
|
3 |
+
|
4 |
+
use Codelight\GDPR\DataSubject\DataSubjectIdentificator;
|
5 |
+
use Codelight\GDPR\DataSubject\DataSubjectAuthenticator;
|
6 |
+
use Codelight\GDPR\Modules\WPML\WPML;
|
7 |
+
use Codelight\GDPR\DataSubject\DataExporter;
|
8 |
+
|
9 |
+
class Singleton {
|
10 |
+
var $View;
|
11 |
+
var $Options;
|
12 |
+
var $Consent;
|
13 |
+
var $Helpers;
|
14 |
+
var $Themes;
|
15 |
+
var $DataSubject;
|
16 |
+
var $AdminNotice;
|
17 |
+
var $AdminError;
|
18 |
+
var $AdminInstallerNotice;
|
19 |
+
var $PrivacySafe;
|
20 |
+
var $AdminModal;
|
21 |
+
var $AdminPage;
|
22 |
+
var $AdminTabGeneral;
|
23 |
+
var $PluginUrl;
|
24 |
+
var $PluginPath;
|
25 |
+
var $PluginTemplatePath;
|
26 |
+
var $InstallerWizardUrl;
|
27 |
+
var $DataSubjectAuthenticator;
|
28 |
+
var $DataSubjectIdentificator;
|
29 |
+
var $DataExporter;
|
30 |
+
var $UserConsentModel;
|
31 |
+
var $DataManager;
|
32 |
+
|
33 |
+
function init($path) {
|
34 |
+
$this->PluginUrl = plugin_dir_url($path);
|
35 |
+
$this->PluginPath = plugin_dir_path($path);
|
36 |
+
$this->PluginTemplatePath = plugin_dir_path($path) . 'views/';
|
37 |
+
$this->HelpUrl = 'https://www.data443.com/gdpr-framework/';
|
38 |
+
|
39 |
+
$this->InstallerWizardUrl = self_admin_url("index.php?page=gdpr-setup&gdpr-step=");
|
40 |
+
|
41 |
+
$this->View = new View();
|
42 |
+
$this->Options = new Options\Options();
|
43 |
+
$model = new Components\Consent\UserConsentModel();
|
44 |
+
$this->UserConsentModel = $model;
|
45 |
+
$this->Consent = new Components\Consent\ConsentManager($model);
|
46 |
+
$this->Helpers = new Helpers();
|
47 |
+
$this->Themes = new Components\Themes\Themes();
|
48 |
+
$this->DataSubject = new DataSubject\DataSubjectManager($this->Consent);
|
49 |
+
|
50 |
+
new WPML();
|
51 |
+
$identificator = new DataSubjectIdentificator($this->DataSubject, $this->Options, $model);
|
52 |
+
$authenticator = new DataSubjectAuthenticator($this->DataSubject, $identificator);
|
53 |
+
new Router($authenticator);
|
54 |
+
$this->DataSubjectAuthenticator = $authenticator;
|
55 |
+
$this->DataSubjectIdentificator = $identificator;
|
56 |
+
$this->DataExporter = new DataExporter();
|
57 |
+
new Components\PrivacyToolsPage\PrivacyToolsPage();
|
58 |
+
new Components\WordpressComments\WordpressComments($this->DataSubject);
|
59 |
+
$this->DataManager = new Components\WordpressUser\DataManager();
|
60 |
+
new Components\WordpressUser\WordpressUser($this->DataSubject, $this->DataManager);
|
61 |
+
new Components\Themes\Themes();
|
62 |
+
|
63 |
+
if (defined('WPCF7_VERSION')) {
|
64 |
+
new Modules\ContactForm7\ContactForm7($this->DataSubject, $this->Consent);
|
65 |
+
}
|
66 |
+
|
67 |
+
if (defined('FLAMINGO_VERSION')) {
|
68 |
+
new Modules\ContactForm7\Flamingo();
|
69 |
+
}
|
70 |
+
|
71 |
+
if ( defined('WC_VERSION') ) {
|
72 |
+
new Modules\WooCommerceGdpr\WooCommerceGdpr($this->DataSubject, $this->Consent);
|
73 |
+
}
|
74 |
+
|
75 |
+
if ( defined('EDD_VERSION') ) {
|
76 |
+
new Modules\EddGdpr\EddGdpr($this->DataSubject, $this->Consent);
|
77 |
+
}
|
78 |
+
|
79 |
+
if ( defined('ES_PLUGIN_VERSION') ) {
|
80 |
+
new Modules\NewsletterGdpr\NewsletterGdpr($this->DataSubject, $this->Consent);
|
81 |
+
}
|
82 |
+
}
|
83 |
+
}
|
src/View.php
CHANGED
@@ -53,10 +53,12 @@ class View
|
|
53 |
*/
|
54 |
protected function getTemplateDirectories()
|
55 |
{
|
|
|
|
|
56 |
$directories = array_filter([
|
57 |
get_stylesheet_directory() . '/gdpr-framework/',
|
58 |
get_template_directory() . '/gdpr-framework/',
|
59 |
-
gdpr
|
60 |
], 'is_dir');
|
61 |
|
62 |
return array_unique(apply_filters('gdpr/views', $directories));
|
53 |
*/
|
54 |
protected function getTemplateDirectories()
|
55 |
{
|
56 |
+
global $gdpr;
|
57 |
+
|
58 |
$directories = array_filter([
|
59 |
get_stylesheet_directory() . '/gdpr-framework/',
|
60 |
get_template_directory() . '/gdpr-framework/',
|
61 |
+
$gdpr->PluginTemplatePath,
|
62 |
], 'is_dir');
|
63 |
|
64 |
return array_unique(apply_filters('gdpr/views', $directories));
|
vendor/autoload.php
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// autoload.php @generated by Composer
|
4 |
-
|
5 |
-
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
-
|
7 |
-
return ComposerAutoloaderInit6fcc4a44d7e9d84978c33c3077ec8efb::getLoader();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/ClassLoader.php
DELETED
@@ -1,572 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* This file is part of Composer.
|
5 |
-
*
|
6 |
-
* (c) Nils Adermann <naderman@naderman.de>
|
7 |
-
* Jordi Boggiano <j.boggiano@seld.be>
|
8 |
-
*
|
9 |
-
* For the full copyright and license information, please view the LICENSE
|
10 |
-
* file that was distributed with this source code.
|
11 |
-
*/
|
12 |
-
|
13 |
-
namespace Composer\Autoload;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
|
17 |
-
*
|
18 |
-
* $loader = new \Composer\Autoload\ClassLoader();
|
19 |
-
*
|
20 |
-
* // register classes with namespaces
|
21 |
-
* $loader->add('Symfony\Component', __DIR__.'/component');
|
22 |
-
* $loader->add('Symfony', __DIR__.'/framework');
|
23 |
-
*
|
24 |
-
* // activate the autoloader
|
25 |
-
* $loader->register();
|
26 |
-
*
|
27 |
-
* // to enable searching the include path (eg. for PEAR packages)
|
28 |
-
* $loader->setUseIncludePath(true);
|
29 |
-
*
|
30 |
-
* In this example, if you try to use a class in the Symfony\Component
|
31 |
-
* namespace or one of its children (Symfony\Component\Console for instance),
|
32 |
-
* the autoloader will first look for the class under the component/
|
33 |
-
* directory, and it will then fallback to the framework/ directory if not
|
34 |
-
* found before giving up.
|
35 |
-
*
|
36 |
-
* This class is loosely based on the Symfony UniversalClassLoader.
|
37 |
-
*
|
38 |
-
* @author Fabien Potencier <fabien@symfony.com>
|
39 |
-
* @author Jordi Boggiano <j.boggiano@seld.be>
|
40 |
-
* @see https://www.php-fig.org/psr/psr-0/
|
41 |
-
* @see https://www.php-fig.org/psr/psr-4/
|
42 |
-
*/
|
43 |
-
class ClassLoader
|
44 |
-
{
|
45 |
-
/** @var ?string */
|
46 |
-
private $vendorDir;
|
47 |
-
|
48 |
-
// PSR-4
|
49 |
-
/**
|
50 |
-
* @var array[]
|
51 |
-
* @psalm-var array<string, array<string, int>>
|
52 |
-
*/
|
53 |
-
private $prefixLengthsPsr4 = array();
|
54 |
-
/**
|
55 |
-
* @var array[]
|
56 |
-
* @psalm-var array<string, array<int, string>>
|
57 |
-
*/
|
58 |
-
private $prefixDirsPsr4 = array();
|
59 |
-
/**
|
60 |
-
* @var array[]
|
61 |
-
* @psalm-var array<string, string>
|
62 |
-
*/
|
63 |
-
private $fallbackDirsPsr4 = array();
|
64 |
-
|
65 |
-
// PSR-0
|
66 |
-
/**
|
67 |
-
* @var array[]
|
68 |
-
* @psalm-var array<string, array<string, string[]>>
|
69 |
-
*/
|
70 |
-
private $prefixesPsr0 = array();
|
71 |
-
/**
|
72 |
-
* @var array[]
|
73 |
-
* @psalm-var array<string, string>
|
74 |
-
*/
|
75 |
-
private $fallbackDirsPsr0 = array();
|
76 |
-
|
77 |
-
/** @var bool */
|
78 |
-
private $useIncludePath = false;
|
79 |
-
|
80 |
-
/**
|
81 |
-
* @var string[]
|
82 |
-
* @psalm-var array<string, string>
|
83 |
-
*/
|
84 |
-
private $classMap = array();
|
85 |
-
|
86 |
-
/** @var bool */
|
87 |
-
private $classMapAuthoritative = false;
|
88 |
-
|
89 |
-
/**
|
90 |
-
* @var bool[]
|
91 |
-
* @psalm-var array<string, bool>
|
92 |
-
*/
|
93 |
-
private $missingClasses = array();
|
94 |
-
|
95 |
-
/** @var ?string */
|
96 |
-
private $apcuPrefix;
|
97 |
-
|
98 |
-
/**
|
99 |
-
* @var self[]
|
100 |
-
*/
|
101 |
-
private static $registeredLoaders = array();
|
102 |
-
|
103 |
-
/**
|
104 |
-
* @param ?string $vendorDir
|
105 |
-
*/
|
106 |
-
public function __construct($vendorDir = null)
|
107 |
-
{
|
108 |
-
$this->vendorDir = $vendorDir;
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* @return string[]
|
113 |
-
*/
|
114 |
-
public function getPrefixes()
|
115 |
-
{
|
116 |
-
if (!empty($this->prefixesPsr0)) {
|
117 |
-
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
|
118 |
-
}
|
119 |
-
|
120 |
-
return array();
|
121 |
-
}
|
122 |
-
|
123 |
-
/**
|
124 |
-
* @return array[]
|
125 |
-
* @psalm-return array<string, array<int, string>>
|
126 |
-
*/
|
127 |
-
public function getPrefixesPsr4()
|
128 |
-
{
|
129 |
-
return $this->prefixDirsPsr4;
|
130 |
-
}
|
131 |
-
|
132 |
-
/**
|
133 |
-
* @return array[]
|
134 |
-
* @psalm-return array<string, string>
|
135 |
-
*/
|
136 |
-
public function getFallbackDirs()
|
137 |
-
{
|
138 |
-
return $this->fallbackDirsPsr0;
|
139 |
-
}
|
140 |
-
|
141 |
-
/**
|
142 |
-
* @return array[]
|
143 |
-
* @psalm-return array<string, string>
|
144 |
-
*/
|
145 |
-
public function getFallbackDirsPsr4()
|
146 |
-
{
|
147 |
-
return $this->fallbackDirsPsr4;
|
148 |
-
}
|
149 |
-
|
150 |
-
/**
|
151 |
-
* @return string[] Array of classname => path
|
152 |
-
* @psalm-var array<string, string>
|
153 |
-
*/
|
154 |
-
public function getClassMap()
|
155 |
-
{
|
156 |
-
return $this->classMap;
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* @param string[] $classMap Class to filename map
|
161 |
-
* @psalm-param array<string, string> $classMap
|
162 |
-
*
|
163 |
-
* @return void
|
164 |
-
*/
|
165 |
-
public function addClassMap(array $classMap)
|
166 |
-
{
|
167 |
-
if ($this->classMap) {
|
168 |
-
$this->classMap = array_merge($this->classMap, $classMap);
|
169 |
-
} else {
|
170 |
-
$this->classMap = $classMap;
|
171 |
-
}
|
172 |
-
}
|
173 |
-
|
174 |
-
/**
|
175 |
-
* Registers a set of PSR-0 directories for a given prefix, either
|
176 |
-
* appending or prepending to the ones previously set for this prefix.
|
177 |
-
*
|
178 |
-
* @param string $prefix The prefix
|
179 |
-
* @param string[]|string $paths The PSR-0 root directories
|
180 |
-
* @param bool $prepend Whether to prepend the directories
|
181 |
-
*
|
182 |
-
* @return void
|
183 |
-
*/
|
184 |
-
public function add($prefix, $paths, $prepend = false)
|
185 |
-
{
|
186 |
-
if (!$prefix) {
|
187 |
-
if ($prepend) {
|
188 |
-
$this->fallbackDirsPsr0 = array_merge(
|
189 |
-
(array) $paths,
|
190 |
-
$this->fallbackDirsPsr0
|
191 |
-
);
|
192 |
-
} else {
|
193 |
-
$this->fallbackDirsPsr0 = array_merge(
|
194 |
-
$this->fallbackDirsPsr0,
|
195 |
-
(array) $paths
|
196 |
-
);
|
197 |
-
}
|
198 |
-
|
199 |
-
return;
|
200 |
-
}
|
201 |
-
|
202 |
-
$first = $prefix[0];
|
203 |
-
if (!isset($this->prefixesPsr0[$first][$prefix])) {
|
204 |
-
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
|
205 |
-
|
206 |
-
return;
|
207 |
-
}
|
208 |
-
if ($prepend) {
|
209 |
-
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
210 |
-
(array) $paths,
|
211 |
-
$this->prefixesPsr0[$first][$prefix]
|
212 |
-
);
|
213 |
-
} else {
|
214 |
-
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
215 |
-
$this->prefixesPsr0[$first][$prefix],
|
216 |
-
(array) $paths
|
217 |
-
);
|
218 |
-
}
|
219 |
-
}
|
220 |
-
|
221 |
-
/**
|
222 |
-
* Registers a set of PSR-4 directories for a given namespace, either
|
223 |
-
* appending or prepending to the ones previously set for this namespace.
|
224 |
-
*
|
225 |
-
* @param string $prefix The prefix/namespace, with trailing '\\'
|
226 |
-
* @param string[]|string $paths The PSR-4 base directories
|
227 |
-
* @param bool $prepend Whether to prepend the directories
|
228 |
-
*
|
229 |
-
* @throws \InvalidArgumentException
|
230 |
-
*
|
231 |
-
* @return void
|
232 |
-
*/
|
233 |
-
public function addPsr4($prefix, $paths, $prepend = false)
|
234 |
-
{
|
235 |
-
if (!$prefix) {
|
236 |
-
// Register directories for the root namespace.
|
237 |
-
if ($prepend) {
|
238 |
-
$this->fallbackDirsPsr4 = array_merge(
|
239 |
-
(array) $paths,
|
240 |
-
$this->fallbackDirsPsr4
|
241 |
-
);
|
242 |
-
} else {
|
243 |
-
$this->fallbackDirsPsr4 = array_merge(
|
244 |
-
$this->fallbackDirsPsr4,
|
245 |
-
(array) $paths
|
246 |
-
);
|
247 |
-
}
|
248 |
-
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
249 |
-
// Register directories for a new namespace.
|
250 |
-
$length = strlen($prefix);
|
251 |
-
if ('\\' !== $prefix[$length - 1]) {
|
252 |
-
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
253 |
-
}
|
254 |
-
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
255 |
-
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
256 |
-
} elseif ($prepend) {
|
257 |
-
// Prepend directories for an already registered namespace.
|
258 |
-
$this->prefixDirsPsr4[$prefix] = array_merge(
|
259 |
-
(array) $paths,
|
260 |
-
$this->prefixDirsPsr4[$prefix]
|
261 |
-
);
|
262 |
-
} else {
|
263 |
-
// Append directories for an already registered namespace.
|
264 |
-
$this->prefixDirsPsr4[$prefix] = array_merge(
|
265 |
-
$this->prefixDirsPsr4[$prefix],
|
266 |
-
(array) $paths
|
267 |
-
);
|
268 |
-
}
|
269 |
-
}
|
270 |
-
|
271 |
-
/**
|
272 |
-
* Registers a set of PSR-0 directories for a given prefix,
|
273 |
-
* replacing any others previously set for this prefix.
|
274 |
-
*
|
275 |
-
* @param string $prefix The prefix
|
276 |
-
* @param string[]|string $paths The PSR-0 base directories
|
277 |
-
*
|
278 |
-
* @return void
|
279 |
-
*/
|
280 |
-
public function set($prefix, $paths)
|
281 |
-
{
|
282 |
-
if (!$prefix) {
|
283 |
-
$this->fallbackDirsPsr0 = (array) $paths;
|
284 |
-
} else {
|
285 |
-
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
|
286 |
-
}
|
287 |
-
}
|
288 |
-
|
289 |
-
/**
|
290 |
-
* Registers a set of PSR-4 directories for a given namespace,
|
291 |
-
* replacing any others previously set for this namespace.
|
292 |
-
*
|
293 |
-
* @param string $prefix The prefix/namespace, with trailing '\\'
|
294 |
-
* @param string[]|string $paths The PSR-4 base directories
|
295 |
-
*
|
296 |
-
* @throws \InvalidArgumentException
|
297 |
-
*
|
298 |
-
* @return void
|
299 |
-
*/
|
300 |
-
public function setPsr4($prefix, $paths)
|
301 |
-
{
|
302 |
-
if (!$prefix) {
|
303 |
-
$this->fallbackDirsPsr4 = (array) $paths;
|
304 |
-
} else {
|
305 |
-
$length = strlen($prefix);
|
306 |
-
if ('\\' !== $prefix[$length - 1]) {
|
307 |
-
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
308 |
-
}
|
309 |
-
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
310 |
-
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
311 |
-
}
|
312 |
-
}
|
313 |
-
|
314 |
-
/**
|
315 |
-
* Turns on searching the include path for class files.
|
316 |
-
*
|
317 |
-
* @param bool $useIncludePath
|
318 |
-
*
|
319 |
-
* @return void
|
320 |
-
*/
|
321 |
-
public function setUseIncludePath($useIncludePath)
|
322 |
-
{
|
323 |
-
$this->useIncludePath = $useIncludePath;
|
324 |
-
}
|
325 |
-
|
326 |
-
/**
|
327 |
-
* Can be used to check if the autoloader uses the include path to check
|
328 |
-
* for classes.
|
329 |
-
*
|
330 |
-
* @return bool
|
331 |
-
*/
|
332 |
-
public function getUseIncludePath()
|
333 |
-
{
|
334 |
-
return $this->useIncludePath;
|
335 |
-
}
|
336 |
-
|
337 |
-
/**
|
338 |
-
* Turns off searching the prefix and fallback directories for classes
|
339 |
-
* that have not been registered with the class map.
|
340 |
-
*
|
341 |
-
* @param bool $classMapAuthoritative
|
342 |
-
*
|
343 |
-
* @return void
|
344 |
-
*/
|
345 |
-
public function setClassMapAuthoritative($classMapAuthoritative)
|
346 |
-
{
|
347 |
-
$this->classMapAuthoritative = $classMapAuthoritative;
|
348 |
-
}
|
349 |
-
|
350 |
-
/**
|
351 |
-
* Should class lookup fail if not found in the current class map?
|
352 |
-
*
|
353 |
-
* @return bool
|
354 |
-
*/
|
355 |
-
public function isClassMapAuthoritative()
|
356 |
-
{
|
357 |
-
return $this->classMapAuthoritative;
|
358 |
-
}
|
359 |
-
|
360 |
-
/**
|
361 |
-
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
362 |
-
*
|
363 |
-
* @param string|null $apcuPrefix
|
364 |
-
*
|
365 |
-
* @return void
|
366 |
-
*/
|
367 |
-
public function setApcuPrefix($apcuPrefix)
|
368 |
-
{
|
369 |
-
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
370 |
-
}
|
371 |
-
|
372 |
-
/**
|
373 |
-
* The APCu prefix in use, or null if APCu caching is not enabled.
|
374 |
-
*
|
375 |
-
* @return string|null
|
376 |
-
*/
|
377 |
-
public function getApcuPrefix()
|
378 |
-
{
|
379 |
-
return $this->apcuPrefix;
|
380 |
-
}
|
381 |
-
|
382 |
-
/**
|
383 |
-
* Registers this instance as an autoloader.
|
384 |
-
*
|
385 |
-
* @param bool $prepend Whether to prepend the autoloader or not
|
386 |
-
*
|
387 |
-
* @return void
|
388 |
-
*/
|
389 |
-
public function register($prepend = false)
|
390 |
-
{
|
391 |
-
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
392 |
-
|
393 |
-
if (null === $this->vendorDir) {
|
394 |
-
return;
|
395 |
-
}
|
396 |
-
|
397 |
-
if ($prepend) {
|
398 |
-
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
|
399 |
-
} else {
|
400 |
-
unset(self::$registeredLoaders[$this->vendorDir]);
|
401 |
-
self::$registeredLoaders[$this->vendorDir] = $this;
|
402 |
-
}
|
403 |
-
}
|
404 |
-
|
405 |
-
/**
|
406 |
-
* Unregisters this instance as an autoloader.
|
407 |
-
*
|
408 |
-
* @return void
|
409 |
-
*/
|
410 |
-
public function unregister()
|
411 |
-
{
|
412 |
-
spl_autoload_unregister(array($this, 'loadClass'));
|
413 |
-
|
414 |
-
if (null !== $this->vendorDir) {
|
415 |
-
unset(self::$registeredLoaders[$this->vendorDir]);
|
416 |
-
}
|
417 |
-
}
|
418 |
-
|
419 |
-
/**
|
420 |
-
* Loads the given class or interface.
|
421 |
-
*
|
422 |
-
* @param string $class The name of the class
|
423 |
-
* @return true|null True if loaded, null otherwise
|
424 |
-
*/
|
425 |
-
public function loadClass($class)
|
426 |
-
{
|
427 |
-
if ($file = $this->findFile($class)) {
|
428 |
-
includeFile($file);
|
429 |
-
|
430 |
-
return true;
|
431 |
-
}
|
432 |
-
|
433 |
-
return null;
|
434 |
-
}
|
435 |
-
|
436 |
-
/**
|
437 |
-
* Finds the path to the file where the class is defined.
|
438 |
-
*
|
439 |
-
* @param string $class The name of the class
|
440 |
-
*
|
441 |
-
* @return string|false The path if found, false otherwise
|
442 |
-
*/
|
443 |
-
public function findFile($class)
|
444 |
-
{
|
445 |
-
// class map lookup
|
446 |
-
if (isset($this->classMap[$class])) {
|
447 |
-
return $this->classMap[$class];
|
448 |
-
}
|
449 |
-
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
450 |
-
return false;
|
451 |
-
}
|
452 |
-
if (null !== $this->apcuPrefix) {
|
453 |
-
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
|
454 |
-
if ($hit) {
|
455 |
-
return $file;
|
456 |
-
}
|
457 |
-
}
|
458 |
-
|
459 |
-
$file = $this->findFileWithExtension($class, '.php');
|
460 |
-
|
461 |
-
// Search for Hack files if we are running on HHVM
|
462 |
-
if (false === $file && defined('HHVM_VERSION')) {
|
463 |
-
$file = $this->findFileWithExtension($class, '.hh');
|
464 |
-
}
|
465 |
-
|
466 |
-
if (null !== $this->apcuPrefix) {
|
467 |
-
apcu_add($this->apcuPrefix.$class, $file);
|
468 |
-
}
|
469 |
-
|
470 |
-
if (false === $file) {
|
471 |
-
// Remember that this class does not exist.
|
472 |
-
$this->missingClasses[$class] = true;
|
473 |
-
}
|
474 |
-
|
475 |
-
return $file;
|
476 |
-
}
|
477 |
-
|
478 |
-
/**
|
479 |
-
* Returns the currently registered loaders indexed by their corresponding vendor directories.
|
480 |
-
*
|
481 |
-
* @return self[]
|
482 |
-
*/
|
483 |
-
public static function getRegisteredLoaders()
|
484 |
-
{
|
485 |
-
return self::$registeredLoaders;
|
486 |
-
}
|
487 |
-
|
488 |
-
/**
|
489 |
-
* @param string $class
|
490 |
-
* @param string $ext
|
491 |
-
* @return string|false
|
492 |
-
*/
|
493 |
-
private function findFileWithExtension($class, $ext)
|
494 |
-
{
|
495 |
-
// PSR-4 lookup
|
496 |
-
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
497 |
-
|
498 |
-
$first = $class[0];
|
499 |
-
if (isset($this->prefixLengthsPsr4[$first])) {
|
500 |
-
$subPath = $class;
|
501 |
-
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
502 |
-
$subPath = substr($subPath, 0, $lastPos);
|
503 |
-
$search = $subPath . '\\';
|
504 |
-
if (isset($this->prefixDirsPsr4[$search])) {
|
505 |
-
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
506 |
-
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
507 |
-
if (file_exists($file = $dir . $pathEnd)) {
|
508 |
-
return $file;
|
509 |
-
}
|
510 |
-
}
|
511 |
-
}
|
512 |
-
}
|
513 |
-
}
|
514 |
-
|
515 |
-
// PSR-4 fallback dirs
|
516 |
-
foreach ($this->fallbackDirsPsr4 as $dir) {
|
517 |
-
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
518 |
-
return $file;
|
519 |
-
}
|
520 |
-
}
|
521 |
-
|
522 |
-
// PSR-0 lookup
|
523 |
-
if (false !== $pos = strrpos($class, '\\')) {
|
524 |
-
// namespaced class name
|
525 |
-
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
|
526 |
-
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
|
527 |
-
} else {
|
528 |
-
// PEAR-like class name
|
529 |
-
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
|
530 |
-
}
|
531 |
-
|
532 |
-
if (isset($this->prefixesPsr0[$first])) {
|
533 |
-
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
534 |
-
if (0 === strpos($class, $prefix)) {
|
535 |
-
foreach ($dirs as $dir) {
|
536 |
-
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
537 |
-
return $file;
|
538 |
-
}
|
539 |
-
}
|
540 |
-
}
|
541 |
-
}
|
542 |
-
}
|
543 |
-
|
544 |
-
// PSR-0 fallback dirs
|
545 |
-
foreach ($this->fallbackDirsPsr0 as $dir) {
|
546 |
-
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
547 |
-
return $file;
|
548 |
-
}
|
549 |
-
}
|
550 |
-
|
551 |
-
// PSR-0 include paths.
|
552 |
-
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
553 |
-
return $file;
|
554 |
-
}
|
555 |
-
|
556 |
-
return false;
|
557 |
-
}
|
558 |
-
}
|
559 |
-
|
560 |
-
/**
|
561 |
-
* Scope isolated include.
|
562 |
-
*
|
563 |
-
* Prevents access to $this/self from included files.
|
564 |
-
*
|
565 |
-
* @param string $file
|
566 |
-
* @return void
|
567 |
-
* @private
|
568 |
-
*/
|
569 |
-
function includeFile($file)
|
570 |
-
{
|
571 |
-
include $file;
|
572 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/InstalledVersions.php
DELETED
@@ -1,305 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* This file is part of Composer.
|
5 |
-
*
|
6 |
-
* (c) Nils Adermann <naderman@naderman.de>
|
7 |
-
* Jordi Boggiano <j.boggiano@seld.be>
|
8 |
-
*
|
9 |
-
* For the full copyright and license information, please view the LICENSE
|
10 |
-
* file that was distributed with this source code.
|
11 |
-
*/
|
12 |
-
namespace Data443\gdpr\framework\Composer;
|
13 |
-
|
14 |
-
use Data443\gdpr\framework\Composer\Autoload\ClassLoader;
|
15 |
-
use Data443\gdpr\framework\Composer\Semver\VersionParser;
|
16 |
-
/**
|
17 |
-
* This class is copied in every Composer installed project and available to all
|
18 |
-
*
|
19 |
-
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
20 |
-
*
|
21 |
-
* To require its presence, you can require `composer-runtime-api ^2.0`
|
22 |
-
*/
|
23 |
-
class InstalledVersions
|
24 |
-
{
|
25 |
-
/**
|
26 |
-
* @var mixed[]|null
|
27 |
-
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
|
28 |
-
*/
|
29 |
-
private static $installed;
|
30 |
-
/**
|
31 |
-
* @var bool|null
|
32 |
-
*/
|
33 |
-
private static $canGetVendors;
|
34 |
-
/**
|
35 |
-
* @var array[]
|
36 |
-
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
37 |
-
*/
|
38 |
-
private static $installedByVendor = array();
|
39 |
-
/**
|
40 |
-
* Returns a list of all package names which are present, either by being installed, replaced or provided
|
41 |
-
*
|
42 |
-
* @return string[]
|
43 |
-
* @psalm-return list<string>
|
44 |
-
*/
|
45 |
-
public static function getInstalledPackages()
|
46 |
-
{
|
47 |
-
$packages = array();
|
48 |
-
foreach (self::getInstalled() as $installed) {
|
49 |
-
$packages[] = \array_keys($installed['versions']);
|
50 |
-
}
|
51 |
-
if (1 === \count($packages)) {
|
52 |
-
return $packages[0];
|
53 |
-
}
|
54 |
-
return \array_keys(\array_flip(\call_user_func_array('array_merge', $packages)));
|
55 |
-
}
|
56 |
-
/**
|
57 |
-
* Returns a list of all package names with a specific type e.g. 'library'
|
58 |
-
*
|
59 |
-
* @param string $type
|
60 |
-
* @return string[]
|
61 |
-
* @psalm-return list<string>
|
62 |
-
*/
|
63 |
-
public static function getInstalledPackagesByType($type)
|
64 |
-
{
|
65 |
-
$packagesByType = array();
|
66 |
-
foreach (self::getInstalled() as $installed) {
|
67 |
-
foreach ($installed['versions'] as $name => $package) {
|
68 |
-
if (isset($package['type']) && $package['type'] === $type) {
|
69 |
-
$packagesByType[] = $name;
|
70 |
-
}
|
71 |
-
}
|
72 |
-
}
|
73 |
-
return $packagesByType;
|
74 |
-
}
|
75 |
-
/**
|
76 |
-
* Checks whether the given package is installed
|
77 |
-
*
|
78 |
-
* This also returns true if the package name is provided or replaced by another package
|
79 |
-
*
|
80 |
-
* @param string $packageName
|
81 |
-
* @param bool $includeDevRequirements
|
82 |
-
* @return bool
|
83 |
-
*/
|
84 |
-
public static function isInstalled($packageName, $includeDevRequirements = \true)
|
85 |
-
{
|
86 |
-
foreach (self::getInstalled() as $installed) {
|
87 |
-
if (isset($installed['versions'][$packageName])) {
|
88 |
-
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
|
89 |
-
}
|
90 |
-
}
|
91 |
-
return \false;
|
92 |
-
}
|
93 |
-
/**
|
94 |
-
* Checks whether the given package satisfies a version constraint
|
95 |
-
*
|
96 |
-
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
|
97 |
-
*
|
98 |
-
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
|
99 |
-
*
|
100 |
-
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
|
101 |
-
* @param string $packageName
|
102 |
-
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
|
103 |
-
* @return bool
|
104 |
-
*/
|
105 |
-
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
106 |
-
{
|
107 |
-
$constraint = $parser->parseConstraints($constraint);
|
108 |
-
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
|
109 |
-
return $provided->matches($constraint);
|
110 |
-
}
|
111 |
-
/**
|
112 |
-
* Returns a version constraint representing all the range(s) which are installed for a given package
|
113 |
-
*
|
114 |
-
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
|
115 |
-
* whether a given version of a package is installed, and not just whether it exists
|
116 |
-
*
|
117 |
-
* @param string $packageName
|
118 |
-
* @return string Version constraint usable with composer/semver
|
119 |
-
*/
|
120 |
-
public static function getVersionRanges($packageName)
|
121 |
-
{
|
122 |
-
foreach (self::getInstalled() as $installed) {
|
123 |
-
if (!isset($installed['versions'][$packageName])) {
|
124 |
-
continue;
|
125 |
-
}
|
126 |
-
$ranges = array();
|
127 |
-
if (isset($installed['versions'][$packageName]['pretty_version'])) {
|
128 |
-
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
|
129 |
-
}
|
130 |
-
if (\array_key_exists('aliases', $installed['versions'][$packageName])) {
|
131 |
-
$ranges = \array_merge($ranges, $installed['versions'][$packageName]['aliases']);
|
132 |
-
}
|
133 |
-
if (\array_key_exists('replaced', $installed['versions'][$packageName])) {
|
134 |
-
$ranges = \array_merge($ranges, $installed['versions'][$packageName]['replaced']);
|
135 |
-
}
|
136 |
-
if (\array_key_exists('provided', $installed['versions'][$packageName])) {
|
137 |
-
$ranges = \array_merge($ranges, $installed['versions'][$packageName]['provided']);
|
138 |
-
}
|
139 |
-
return \implode(' || ', $ranges);
|
140 |
-
}
|
141 |
-
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
142 |
-
}
|
143 |
-
/**
|
144 |
-
* @param string $packageName
|
145 |
-
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
146 |
-
*/
|
147 |
-
public static function getVersion($packageName)
|
148 |
-
{
|
149 |
-
foreach (self::getInstalled() as $installed) {
|
150 |
-
if (!isset($installed['versions'][$packageName])) {
|
151 |
-
continue;
|
152 |
-
}
|
153 |
-
if (!isset($installed['versions'][$packageName]['version'])) {
|
154 |
-
return null;
|
155 |
-
}
|
156 |
-
return $installed['versions'][$packageName]['version'];
|
157 |
-
}
|
158 |
-
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
159 |
-
}
|
160 |
-
/**
|
161 |
-
* @param string $packageName
|
162 |
-
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
163 |
-
*/
|
164 |
-
public static function getPrettyVersion($packageName)
|
165 |
-
{
|
166 |
-
foreach (self::getInstalled() as $installed) {
|
167 |
-
if (!isset($installed['versions'][$packageName])) {
|
168 |
-
continue;
|
169 |
-
}
|
170 |
-
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
|
171 |
-
return null;
|
172 |
-
}
|
173 |
-
return $installed['versions'][$packageName]['pretty_version'];
|
174 |
-
}
|
175 |
-
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
176 |
-
}
|
177 |
-
/**
|
178 |
-
* @param string $packageName
|
179 |
-
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
|
180 |
-
*/
|
181 |
-
public static function getReference($packageName)
|
182 |
-
{
|
183 |
-
foreach (self::getInstalled() as $installed) {
|
184 |
-
if (!isset($installed['versions'][$packageName])) {
|
185 |
-
continue;
|
186 |
-
}
|
187 |
-
if (!isset($installed['versions'][$packageName]['reference'])) {
|
188 |
-
return null;
|
189 |
-
}
|
190 |
-
return $installed['versions'][$packageName]['reference'];
|
191 |
-
}
|
192 |
-
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
193 |
-
}
|
194 |
-
/**
|
195 |
-
* @param string $packageName
|
196 |
-
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
|
197 |
-
*/
|
198 |
-
public static function getInstallPath($packageName)
|
199 |
-
{
|
200 |
-
foreach (self::getInstalled() as $installed) {
|
201 |
-
if (!isset($installed['versions'][$packageName])) {
|
202 |
-
continue;
|
203 |
-
}
|
204 |
-
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
|
205 |
-
}
|
206 |
-
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
207 |
-
}
|
208 |
-
/**
|
209 |
-
* @return array
|
210 |
-
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
|
211 |
-
*/
|
212 |
-
public static function getRootPackage()
|
213 |
-
{
|
214 |
-
$installed = self::getInstalled();
|
215 |
-
return $installed[0]['root'];
|
216 |
-
}
|
217 |
-
/**
|
218 |
-
* Returns the raw installed.php data for custom implementations
|
219 |
-
*
|
220 |
-
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
|
221 |
-
* @return array[]
|
222 |
-
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
|
223 |
-
*/
|
224 |
-
public static function getRawData()
|
225 |
-
{
|
226 |
-
@\trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', \E_USER_DEPRECATED);
|
227 |
-
if (null === self::$installed) {
|
228 |
-
// only require the installed.php file if this file is loaded from its dumped location,
|
229 |
-
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
230 |
-
if (\substr(__DIR__, -8, 1) !== 'C') {
|
231 |
-
self::$installed = (include __DIR__ . '/installed.php');
|
232 |
-
} else {
|
233 |
-
self::$installed = array();
|
234 |
-
}
|
235 |
-
}
|
236 |
-
return self::$installed;
|
237 |
-
}
|
238 |
-
/**
|
239 |
-
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
240 |
-
*
|
241 |
-
* @return array[]
|
242 |
-
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
243 |
-
*/
|
244 |
-
public static function getAllRawData()
|
245 |
-
{
|
246 |
-
return self::getInstalled();
|
247 |
-
}
|
248 |
-
/**
|
249 |
-
* Lets you reload the static array from another file
|
250 |
-
*
|
251 |
-
* This is only useful for complex integrations in which a project needs to use
|
252 |
-
* this class but then also needs to execute another project's autoloader in process,
|
253 |
-
* and wants to ensure both projects have access to their version of installed.php.
|
254 |
-
*
|
255 |
-
* A typical case would be PHPUnit, where it would need to make sure it reads all
|
256 |
-
* the data it needs from this class, then call reload() with
|
257 |
-
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
|
258 |
-
* the project in which it runs can then also use this class safely, without
|
259 |
-
* interference between PHPUnit's dependencies and the project's dependencies.
|
260 |
-
*
|
261 |
-
* @param array[] $data A vendor/composer/installed.php data set
|
262 |
-
* @return void
|
263 |
-
*
|
264 |
-
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
|
265 |
-
*/
|
266 |
-
public static function reload($data)
|
267 |
-
{
|
268 |
-
self::$installed = $data;
|
269 |
-
self::$installedByVendor = array();
|
270 |
-
}
|
271 |
-
/**
|
272 |
-
* @return array[]
|
273 |
-
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
274 |
-
*/
|
275 |
-
private static function getInstalled()
|
276 |
-
{
|
277 |
-
if (null === self::$canGetVendors) {
|
278 |
-
self::$canGetVendors = \method_exists('Data443\\gdpr\\framework\\Composer\\Autoload\\ClassLoader', 'getRegisteredLoaders');
|
279 |
-
}
|
280 |
-
$installed = array();
|
281 |
-
if (self::$canGetVendors) {
|
282 |
-
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
283 |
-
if (isset(self::$installedByVendor[$vendorDir])) {
|
284 |
-
$installed[] = self::$installedByVendor[$vendorDir];
|
285 |
-
} elseif (\is_file($vendorDir . '/composer/installed.php')) {
|
286 |
-
$installed[] = self::$installedByVendor[$vendorDir] = (require $vendorDir . '/composer/installed.php');
|
287 |
-
if (null === self::$installed && \strtr($vendorDir . '/composer', '\\', '/') === \strtr(__DIR__, '\\', '/')) {
|
288 |
-
self::$installed = $installed[\count($installed) - 1];
|
289 |
-
}
|
290 |
-
}
|
291 |
-
}
|
292 |
-
}
|
293 |
-
if (null === self::$installed) {
|
294 |
-
// only require the installed.php file if this file is loaded from its dumped location,
|
295 |
-
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
296 |
-
if (\substr(__DIR__, -8, 1) !== 'C') {
|
297 |
-
self::$installed = (require __DIR__ . '/installed.php');
|
298 |
-
} else {
|
299 |
-
self::$installed = array();
|
300 |
-
}
|
301 |
-
}
|
302 |
-
$installed[] = self::$installed;
|
303 |
-
return $installed;
|
304 |
-
}
|
305 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/LICENSE
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
Copyright (c) Nils Adermann, Jordi Boggiano
|
2 |
-
|
3 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
-
of this software and associated documentation files (the "Software"), to deal
|
5 |
-
in the Software without restriction, including without limitation the rights
|
6 |
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7 |
-
copies of the Software, and to permit persons to whom the Software is furnished
|
8 |
-
to do so, subject to the following conditions:
|
9 |
-
|
10 |
-
The above copyright notice and this permission notice shall be included in all
|
11 |
-
copies or substantial portions of the Software.
|
12 |
-
|
13 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19 |
-
THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/autoload_classmap.php
DELETED
@@ -1,232 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// autoload_classmap.php @generated by Composer
|
4 |
-
|
5 |
-
$vendorDir = dirname(dirname(__FILE__));
|
6 |
-
$baseDir = dirname($vendorDir);
|
7 |
-
|
8 |
-
return array(
|
9 |
-
'Codelight\\GDPR\\Admin\\AdminError' => $baseDir . '/src/Admin/AdminError.php',
|
10 |
-
'Codelight\\GDPR\\Admin\\AdminHelper' => $baseDir . '/src/Admin/AdminHelper.php',
|
11 |
-
'Codelight\\GDPR\\Admin\\AdminNotice' => $baseDir . '/src/Admin/AdminNotice.php',
|
12 |
-
'Codelight\\GDPR\\Admin\\AdminPrivacySafe' => $baseDir . '/src/Admin/AdminPrivacySafe.php',
|
13 |
-
'Codelight\\GDPR\\Admin\\AdminTab' => $baseDir . '/src/Admin/AdminTab.php',
|
14 |
-
'Codelight\\GDPR\\Admin\\AdminTabGeneral' => $baseDir . '/src/Admin/AdminTabGeneral.php',
|
15 |
-
'Codelight\\GDPR\\Admin\\AdminTabInterface' => $baseDir . '/src/Admin/AdminTabInterface.php',
|
16 |
-
'Codelight\\GDPR\\Admin\\Modal' => $baseDir . '/src/Admin/Modal.php',
|
17 |
-
'Codelight\\GDPR\\Admin\\WordpressAdmin' => $baseDir . '/src/Admin/WordpressAdmin.php',
|
18 |
-
'Codelight\\GDPR\\Admin\\WordpressAdminPage' => $baseDir . '/src/Admin/WordpressAdminPage.php',
|
19 |
-
'Codelight\\GDPR\\Components\\AdvancedIntegration\\AdminTabAdvancedIntegration' => $baseDir . '/src/Components/AdvancedIntegration/AdminTabAdvancedIntegration.php',
|
20 |
-
'Codelight\\GDPR\\Components\\AdvancedIntegration\\AdvancedIntegration' => $baseDir . '/src/Components/AdvancedIntegration/AdvancedIntegration.php',
|
21 |
-
'Codelight\\GDPR\\Components\\Consent\\AdminTabConsent' => $baseDir . '/src/Components/Consent/AdminTabConsent.php',
|
22 |
-
'Codelight\\GDPR\\Components\\Consent\\ConsentAdmin' => $baseDir . '/src/Components/Consent/ConsentAdmin.php',
|
23 |
-
'Codelight\\GDPR\\Components\\Consent\\ConsentManager' => $baseDir . '/src/Components/Consent/ConsentManager.php',
|
24 |
-
'Codelight\\GDPR\\Components\\Consent\\UserConsentModel' => $baseDir . '/src/Components/Consent/UserConsentModel.php',
|
25 |
-
'Codelight\\GDPR\\Components\\CookiePopup\\AdminTabCookiePopup' => $baseDir . '/src/Components/CookiePopup/AdminTabCookiePopup.php',
|
26 |
-
'Codelight\\GDPR\\Components\\CookiePopup\\CookiePopup' => $baseDir . '/src/Components/CookiePopup/CookiePopup.php',
|
27 |
-
'Codelight\\GDPR\\Components\\DoNotSell\\AdminTabDoNotSell' => $baseDir . '/src/Components/DoNotSell/AdminTabDoNotSell.php',
|
28 |
-
'Codelight\\GDPR\\Components\\DoNotSell\\DoNotSell' => $baseDir . '/src/Components/DoNotSell/DoNotSell.php',
|
29 |
-
'Codelight\\GDPR\\Components\\PrivacyManager\\AdminTabPrivacyManager' => $baseDir . '/src/Components/PrivacyManager/AdminTabPrivacyManager.php',
|
30 |
-
'Codelight\\GDPR\\Components\\PrivacyManager\\PrivacyManager' => $baseDir . '/src/Components/PrivacyManager/PrivacyManager.php',
|
31 |
-
'Codelight\\GDPR\\Components\\PrivacyPolicy\\AdminTabPrivacyPolicy' => $baseDir . '/src/Components/PrivacyPolicy/AdminTabPrivacyPolicy.php',
|
32 |
-
'Codelight\\GDPR\\Components\\PrivacyPolicy\\PolicyGenerator' => $baseDir . '/src/Components/PrivacyPolicy/PolicyGenerator.php',
|
33 |
-
'Codelight\\GDPR\\Components\\PrivacyPolicy\\PrivacyPolicy' => $baseDir . '/src/Components/PrivacyPolicy/PrivacyPolicy.php',
|
34 |
-
'Codelight\\GDPR\\Components\\PrivacySafe\\AdminTabPrivacySafe' => $baseDir . '/src/Components/PrivacySafe/AdminTabPrivacySafe.php',
|
35 |
-
'Codelight\\GDPR\\Components\\PrivacySafe\\PrivacySafe' => $baseDir . '/src/Components/PrivacySafe/PrivacySafe.php',
|
36 |
-
'Codelight\\GDPR\\Components\\PrivacyToolsPage\\PrivacyToolsPage' => $baseDir . '/src/Components/PrivacyToolsPage/PrivacyToolsPage.php',
|
37 |
-
'Codelight\\GDPR\\Components\\PrivacyToolsPage\\PrivacyToolsPageController' => $baseDir . '/src/Components/PrivacyToolsPage/PrivacyToolsPageController.php',
|
38 |
-
'Codelight\\GDPR\\Components\\PrivacyToolsPage\\PrivacyToolsPageShortcode' => $baseDir . '/src/Components/PrivacyToolsPage/PrivacyToolsPageShortcode.php',
|
39 |
-
'Codelight\\GDPR\\Components\\Support\\AdminTabSupport' => $baseDir . '/src/Components/Support/AdminTabSupport.php',
|
40 |
-
'Codelight\\GDPR\\Components\\Support\\Support' => $baseDir . '/src/Components/Support/Support.php',
|
41 |
-
'Codelight\\GDPR\\Components\\Themes\\Themes' => $baseDir . '/src/Components/Themes/Themes.php',
|
42 |
-
'Codelight\\GDPR\\Components\\WordpressComments\\WordpressComments' => $baseDir . '/src/Components/WordpressComments/WordpressComments.php',
|
43 |
-
'Codelight\\GDPR\\Components\\WordpressUser\\Controllers\\DashboardDataPageController' => $baseDir . '/src/Components/WordpressUser/Controllers/DashboardDataPageController.php',
|
44 |
-
'Codelight\\GDPR\\Components\\WordpressUser\\Controllers\\DashboardProfilePageController' => $baseDir . '/src/Components/WordpressUser/Controllers/DashboardProfilePageController.php',
|
45 |
-
'Codelight\\GDPR\\Components\\WordpressUser\\DataManager' => $baseDir . '/src/Components/WordpressUser/DataManager.php',
|
46 |
-
'Codelight\\GDPR\\Components\\WordpressUser\\RegistrationForm' => $baseDir . '/src/Components/WordpressUser/RegistrationForm.php',
|
47 |
-
'Codelight\\GDPR\\Components\\WordpressUser\\WordpressUser' => $baseDir . '/src/Components/WordpressUser/WordpressUser.php',
|
48 |
-
'Codelight\\GDPR\\Config' => $baseDir . '/src/Config.php',
|
49 |
-
'Codelight\\GDPR\\Container' => $baseDir . '/src/Container.php',
|
50 |
-
'Codelight\\GDPR\\DataSubject\\AdminTabDataSubject' => $baseDir . '/src/DataSubject/AdminTabDataSubject.php',
|
51 |
-
'Codelight\\GDPR\\DataSubject\\DataExporter' => $baseDir . '/src/DataSubject/DataExporter.php',
|
52 |
-
'Codelight\\GDPR\\DataSubject\\DataRepository' => $baseDir . '/src/DataSubject/DataRepository.php',
|
53 |
-
'Codelight\\GDPR\\DataSubject\\DataSubject' => $baseDir . '/src/DataSubject/DataSubject.php',
|
54 |
-
'Codelight\\GDPR\\DataSubject\\DataSubjectAdmin' => $baseDir . '/src/DataSubject/DataSubjectAdmin.php',
|
55 |
-
'Codelight\\GDPR\\DataSubject\\DataSubjectAuthenticator' => $baseDir . '/src/DataSubject/DataSubjectAuthenticator.php',
|
56 |
-
'Codelight\\GDPR\\DataSubject\\DataSubjectIdentificator' => $baseDir . '/src/DataSubject/DataSubjectIdentificator.php',
|
57 |
-
'Codelight\\GDPR\\DataSubject\\DataSubjectManager' => $baseDir . '/src/DataSubject/DataSubjectManager.php',
|
58 |
-
'Codelight\\GDPR\\Database\\WordpressDatabase' => $baseDir . '/src/Database/WordpressDatabase.php',
|
59 |
-
'Codelight\\GDPR\\Helpers' => $baseDir . '/src/Helpers.php',
|
60 |
-
'Codelight\\GDPR\\Installer\\AdminInstallerNotice' => $baseDir . '/src/Installer/AdminInstallerNotice.php',
|
61 |
-
'Codelight\\GDPR\\Installer\\Installer' => $baseDir . '/src/Installer/Installer.php',
|
62 |
-
'Codelight\\GDPR\\Installer\\InstallerRouter' => $baseDir . '/src/Installer/InstallerRouter.php',
|
63 |
-
'Codelight\\GDPR\\Installer\\InstallerStep' => $baseDir . '/src/Installer/InstallerStep.php',
|
64 |
-
'Codelight\\GDPR\\Installer\\InstallerStepInterface' => $baseDir . '/src/Installer/InstallerStepInterface.php',
|
65 |
-
'Codelight\\GDPR\\Installer\\InstallerWizard' => $baseDir . '/src/Installer/InstallerWizard.php',
|
66 |
-
'Codelight\\GDPR\\Installer\\Steps\\ConfigurationPages' => $baseDir . '/src/Installer/Steps/ConfigurationPages.php',
|
67 |
-
'Codelight\\GDPR\\Installer\\Steps\\ConfigurationSettings' => $baseDir . '/src/Installer/Steps/ConfigurationSettings.php',
|
68 |
-
'Codelight\\GDPR\\Installer\\Steps\\Consent' => $baseDir . '/src/Installer/Steps/Consent.php',
|
69 |
-
'Codelight\\GDPR\\Installer\\Steps\\Disclaimer' => $baseDir . '/src/Installer/Steps/Disclaimer.php',
|
70 |
-
'Codelight\\GDPR\\Installer\\Steps\\Finish' => $baseDir . '/src/Installer/Steps/Finish.php',
|
71 |
-
'Codelight\\GDPR\\Installer\\Steps\\Integrations' => $baseDir . '/src/Installer/Steps/Integrations.php',
|
72 |
-
'Codelight\\GDPR\\Installer\\Steps\\PolicyContents' => $baseDir . '/src/Installer/Steps/PolicyContents.php',
|
73 |
-
'Codelight\\GDPR\\Installer\\Steps\\PolicySettings' => $baseDir . '/src/Installer/Steps/PolicySettings.php',
|
74 |
-
'Codelight\\GDPR\\Installer\\Steps\\PrivacySafe' => $baseDir . '/src/Installer/Steps/PrivacySafe.php',
|
75 |
-
'Codelight\\GDPR\\Installer\\Steps\\Welcome' => $baseDir . '/src/Installer/Steps/Welcome.php',
|
76 |
-
'Codelight\\GDPR\\Modules\\ContactForm7\\ContactForm7' => $baseDir . '/src/Modules/ContactForm7/ContactForm7.php',
|
77 |
-
'Codelight\\GDPR\\Modules\\ContactForm7\\Flamingo' => $baseDir . '/src/Modules/ContactForm7/Flamingo.php',
|
78 |
-
'Codelight\\GDPR\\Modules\\EddGdpr\\EddGdpr' => $baseDir . '/src/Modules/EddGdpr/EddGdpr.php',
|
79 |
-
'Codelight\\GDPR\\Modules\\NewsletterGdpr\\NewsletterGdpr' => $baseDir . '/src/Modules/NewsletterGdpr/NewsletterGdpr.php',
|
80 |
-
'Codelight\\GDPR\\Modules\\WPML\\WPML' => $baseDir . '/src/Modules/WPML/WPML.php',
|
81 |
-
'Codelight\\GDPR\\Modules\\WooCommerceGdpr\\WooCommerceGdpr' => $baseDir . '/src/Modules/WooCommerceGdpr/WooCommerceGdpr.php',
|
82 |
-
'Codelight\\GDPR\\Options\\Options' => $baseDir . '/src/Options/Options.php',
|
83 |
-
'Codelight\\GDPR\\Options\\OptionsBase' => $baseDir . '/src/Options/OptionsBase.php',
|
84 |
-
'Codelight\\GDPR\\Router' => $baseDir . '/src/Router.php',
|
85 |
-
'Codelight\\GDPR\\Setup' => $baseDir . '/src/Setup.php',
|
86 |
-
'Codelight\\GDPR\\SetupAdmin' => $baseDir . '/src/SetupAdmin.php',
|
87 |
-
'Codelight\\GDPR\\Updater\\Updater' => $baseDir . '/src/Updater/Updater.php',
|
88 |
-
'Codelight\\GDPR\\View' => $baseDir . '/src/View.php',
|
89 |
-
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
90 |
-
'Data443\\gdpr\\framework\\Illuminate\\Config\\Repository' => $vendorDir . '/illuminate/config/Repository.php',
|
91 |
-
'Data443\\gdpr\\framework\\Illuminate\\Container\\BoundMethod' => $vendorDir . '/illuminate/container/BoundMethod.php',
|
92 |
-
'Data443\\gdpr\\framework\\Illuminate\\Container\\Container' => $vendorDir . '/illuminate/container/Container.php',
|
93 |
-
'Data443\\gdpr\\framework\\Illuminate\\Container\\ContextualBindingBuilder' => $vendorDir . '/illuminate/container/ContextualBindingBuilder.php',
|
94 |
-
'Data443\\gdpr\\framework\\Illuminate\\Container\\EntryNotFoundException' => $vendorDir . '/illuminate/container/EntryNotFoundException.php',
|
95 |
-
'Data443\\gdpr\\framework\\Illuminate\\Container\\RewindableGenerator' => $vendorDir . '/illuminate/container/RewindableGenerator.php',
|
96 |
-
'Data443\\gdpr\\framework\\Illuminate\\Container\\Util' => $vendorDir . '/illuminate/container/Util.php',
|
97 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\Access\\Authorizable' => $vendorDir . '/illuminate/contracts/Auth/Access/Authorizable.php',
|
98 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\Access\\Gate' => $vendorDir . '/illuminate/contracts/Auth/Access/Gate.php',
|
99 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\Authenticatable' => $vendorDir . '/illuminate/contracts/Auth/Authenticatable.php',
|
100 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\CanResetPassword' => $vendorDir . '/illuminate/contracts/Auth/CanResetPassword.php',
|
101 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\Factory' => $vendorDir . '/illuminate/contracts/Auth/Factory.php',
|
102 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\Guard' => $vendorDir . '/illuminate/contracts/Auth/Guard.php',
|
103 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\Middleware\\AuthenticatesRequests' => $vendorDir . '/illuminate/contracts/Auth/Middleware/AuthenticatesRequests.php',
|
104 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\MustVerifyEmail' => $vendorDir . '/illuminate/contracts/Auth/MustVerifyEmail.php',
|
105 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\PasswordBroker' => $vendorDir . '/illuminate/contracts/Auth/PasswordBroker.php',
|
106 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\PasswordBrokerFactory' => $vendorDir . '/illuminate/contracts/Auth/PasswordBrokerFactory.php',
|
107 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\StatefulGuard' => $vendorDir . '/illuminate/contracts/Auth/StatefulGuard.php',
|
108 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\SupportsBasicAuth' => $vendorDir . '/illuminate/contracts/Auth/SupportsBasicAuth.php',
|
109 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\UserProvider' => $vendorDir . '/illuminate/contracts/Auth/UserProvider.php',
|
110 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Broadcasting\\Broadcaster' => $vendorDir . '/illuminate/contracts/Broadcasting/Broadcaster.php',
|
111 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Broadcasting\\Factory' => $vendorDir . '/illuminate/contracts/Broadcasting/Factory.php',
|
112 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Broadcasting\\HasBroadcastChannel' => $vendorDir . '/illuminate/contracts/Broadcasting/HasBroadcastChannel.php',
|
113 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Broadcasting\\ShouldBroadcast' => $vendorDir . '/illuminate/contracts/Broadcasting/ShouldBroadcast.php',
|
114 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Broadcasting\\ShouldBroadcastNow' => $vendorDir . '/illuminate/contracts/Broadcasting/ShouldBroadcastNow.php',
|
115 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Bus\\Dispatcher' => $vendorDir . '/illuminate/contracts/Bus/Dispatcher.php',
|
116 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Bus\\QueueingDispatcher' => $vendorDir . '/illuminate/contracts/Bus/QueueingDispatcher.php',
|
117 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Cache\\Factory' => $vendorDir . '/illuminate/contracts/Cache/Factory.php',
|
118 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Cache\\Lock' => $vendorDir . '/illuminate/contracts/Cache/Lock.php',
|
119 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Cache\\LockProvider' => $vendorDir . '/illuminate/contracts/Cache/LockProvider.php',
|
120 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Cache\\LockTimeoutException' => $vendorDir . '/illuminate/contracts/Cache/LockTimeoutException.php',
|
121 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Cache\\Repository' => $vendorDir . '/illuminate/contracts/Cache/Repository.php',
|
122 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Cache\\Store' => $vendorDir . '/illuminate/contracts/Cache/Store.php',
|
123 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Config\\Repository' => $vendorDir . '/illuminate/contracts/Config/Repository.php',
|
124 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Console\\Application' => $vendorDir . '/illuminate/contracts/Console/Application.php',
|
125 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Console\\Kernel' => $vendorDir . '/illuminate/contracts/Console/Kernel.php',
|
126 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Container\\BindingResolutionException' => $vendorDir . '/illuminate/contracts/Container/BindingResolutionException.php',
|
127 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Container\\CircularDependencyException' => $vendorDir . '/illuminate/contracts/Container/CircularDependencyException.php',
|
128 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Container\\Container' => $vendorDir . '/illuminate/contracts/Container/Container.php',
|
129 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Container\\ContextualBindingBuilder' => $vendorDir . '/illuminate/contracts/Container/ContextualBindingBuilder.php',
|
130 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Cookie\\Factory' => $vendorDir . '/illuminate/contracts/Cookie/Factory.php',
|
131 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Cookie\\QueueingFactory' => $vendorDir . '/illuminate/contracts/Cookie/QueueingFactory.php',
|
132 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Database\\Eloquent\\Castable' => $vendorDir . '/illuminate/contracts/Database/Eloquent/Castable.php',
|
133 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes' => $vendorDir . '/illuminate/contracts/Database/Eloquent/CastsAttributes.php',
|
134 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Database\\Eloquent\\CastsInboundAttributes' => $vendorDir . '/illuminate/contracts/Database/Eloquent/CastsInboundAttributes.php',
|
135 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Database\\Eloquent\\DeviatesCastableAttributes' => $vendorDir . '/illuminate/contracts/Database/Eloquent/DeviatesCastableAttributes.php',
|
136 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Database\\Eloquent\\SerializesCastableAttributes' => $vendorDir . '/illuminate/contracts/Database/Eloquent/SerializesCastableAttributes.php',
|
137 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Database\\Eloquent\\SupportsPartialRelations' => $vendorDir . '/illuminate/contracts/Database/Eloquent/SupportsPartialRelations.php',
|
138 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Database\\Events\\MigrationEvent' => $vendorDir . '/illuminate/contracts/Database/Events/MigrationEvent.php',
|
139 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Database\\ModelIdentifier' => $vendorDir . '/illuminate/contracts/Database/ModelIdentifier.php',
|
140 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Debug\\ExceptionHandler' => $vendorDir . '/illuminate/contracts/Debug/ExceptionHandler.php',
|
141 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Encryption\\DecryptException' => $vendorDir . '/illuminate/contracts/Encryption/DecryptException.php',
|
142 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Encryption\\EncryptException' => $vendorDir . '/illuminate/contracts/Encryption/EncryptException.php',
|
143 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Encryption\\Encrypter' => $vendorDir . '/illuminate/contracts/Encryption/Encrypter.php',
|
144 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Encryption\\StringEncrypter' => $vendorDir . '/illuminate/contracts/Encryption/StringEncrypter.php',
|
145 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Events\\Dispatcher' => $vendorDir . '/illuminate/contracts/Events/Dispatcher.php',
|
146 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Filesystem\\Cloud' => $vendorDir . '/illuminate/contracts/Filesystem/Cloud.php',
|
147 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Filesystem\\Factory' => $vendorDir . '/illuminate/contracts/Filesystem/Factory.php',
|
148 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Filesystem\\FileExistsException' => $vendorDir . '/illuminate/contracts/Filesystem/FileExistsException.php',
|
149 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Filesystem\\FileNotFoundException' => $vendorDir . '/illuminate/contracts/Filesystem/FileNotFoundException.php',
|
150 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Filesystem\\Filesystem' => $vendorDir . '/illuminate/contracts/Filesystem/Filesystem.php',
|
151 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Filesystem\\LockTimeoutException' => $vendorDir . '/illuminate/contracts/Filesystem/LockTimeoutException.php',
|
152 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Foundation\\Application' => $vendorDir . '/illuminate/contracts/Foundation/Application.php',
|
153 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Foundation\\CachesConfiguration' => $vendorDir . '/illuminate/contracts/Foundation/CachesConfiguration.php',
|
154 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Foundation\\CachesRoutes' => $vendorDir . '/illuminate/contracts/Foundation/CachesRoutes.php',
|
155 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Hashing\\Hasher' => $vendorDir . '/illuminate/contracts/Hashing/Hasher.php',
|
156 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Http\\Kernel' => $vendorDir . '/illuminate/contracts/Http/Kernel.php',
|
157 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Mail\\Factory' => $vendorDir . '/illuminate/contracts/Mail/Factory.php',
|
158 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Mail\\MailQueue' => $vendorDir . '/illuminate/contracts/Mail/MailQueue.php',
|
159 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Mail\\Mailable' => $vendorDir . '/illuminate/contracts/Mail/Mailable.php',
|
160 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Mail\\Mailer' => $vendorDir . '/illuminate/contracts/Mail/Mailer.php',
|
161 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Notifications\\Dispatcher' => $vendorDir . '/illuminate/contracts/Notifications/Dispatcher.php',
|
162 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Notifications\\Factory' => $vendorDir . '/illuminate/contracts/Notifications/Factory.php',
|
163 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Pagination\\CursorPaginator' => $vendorDir . '/illuminate/contracts/Pagination/CursorPaginator.php',
|
164 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Pagination\\LengthAwarePaginator' => $vendorDir . '/illuminate/contracts/Pagination/LengthAwarePaginator.php',
|
165 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Pagination\\Paginator' => $vendorDir . '/illuminate/contracts/Pagination/Paginator.php',
|
166 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Pipeline\\Hub' => $vendorDir . '/illuminate/contracts/Pipeline/Hub.php',
|
167 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Pipeline\\Pipeline' => $vendorDir . '/illuminate/contracts/Pipeline/Pipeline.php',
|
168 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\ClearableQueue' => $vendorDir . '/illuminate/contracts/Queue/ClearableQueue.php',
|
169 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\EntityNotFoundException' => $vendorDir . '/illuminate/contracts/Queue/EntityNotFoundException.php',
|
170 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\EntityResolver' => $vendorDir . '/illuminate/contracts/Queue/EntityResolver.php',
|
171 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\Factory' => $vendorDir . '/illuminate/contracts/Queue/Factory.php',
|
172 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\Job' => $vendorDir . '/illuminate/contracts/Queue/Job.php',
|
173 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\Monitor' => $vendorDir . '/illuminate/contracts/Queue/Monitor.php',
|
174 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\Queue' => $vendorDir . '/illuminate/contracts/Queue/Queue.php',
|
175 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\QueueableCollection' => $vendorDir . '/illuminate/contracts/Queue/QueueableCollection.php',
|
176 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\QueueableEntity' => $vendorDir . '/illuminate/contracts/Queue/QueueableEntity.php',
|
177 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\ShouldBeEncrypted' => $vendorDir . '/illuminate/contracts/Queue/ShouldBeEncrypted.php',
|
178 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\ShouldBeUnique' => $vendorDir . '/illuminate/contracts/Queue/ShouldBeUnique.php',
|
179 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\ShouldBeUniqueUntilProcessing' => $vendorDir . '/illuminate/contracts/Queue/ShouldBeUniqueUntilProcessing.php',
|
180 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\ShouldQueue' => $vendorDir . '/illuminate/contracts/Queue/ShouldQueue.php',
|
181 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Redis\\Connection' => $vendorDir . '/illuminate/contracts/Redis/Connection.php',
|
182 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Redis\\Connector' => $vendorDir . '/illuminate/contracts/Redis/Connector.php',
|
183 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Redis\\Factory' => $vendorDir . '/illuminate/contracts/Redis/Factory.php',
|
184 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Redis\\LimiterTimeoutException' => $vendorDir . '/illuminate/contracts/Redis/LimiterTimeoutException.php',
|
185 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Routing\\BindingRegistrar' => $vendorDir . '/illuminate/contracts/Routing/BindingRegistrar.php',
|
186 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Routing\\Registrar' => $vendorDir . '/illuminate/contracts/Routing/Registrar.php',
|
187 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Routing\\ResponseFactory' => $vendorDir . '/illuminate/contracts/Routing/ResponseFactory.php',
|
188 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Routing\\UrlGenerator' => $vendorDir . '/illuminate/contracts/Routing/UrlGenerator.php',
|
189 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Routing\\UrlRoutable' => $vendorDir . '/illuminate/contracts/Routing/UrlRoutable.php',
|
190 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Session\\Session' => $vendorDir . '/illuminate/contracts/Session/Session.php',
|
191 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\Arrayable' => $vendorDir . '/illuminate/contracts/Support/Arrayable.php',
|
192 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\CanBeEscapedWhenCastToString' => $vendorDir . '/illuminate/contracts/Support/CanBeEscapedWhenCastToString.php',
|
193 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\DeferrableProvider' => $vendorDir . '/illuminate/contracts/Support/DeferrableProvider.php',
|
194 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\DeferringDisplayableValue' => $vendorDir . '/illuminate/contracts/Support/DeferringDisplayableValue.php',
|
195 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\Htmlable' => $vendorDir . '/illuminate/contracts/Support/Htmlable.php',
|
196 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\Jsonable' => $vendorDir . '/illuminate/contracts/Support/Jsonable.php',
|
197 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\MessageBag' => $vendorDir . '/illuminate/contracts/Support/MessageBag.php',
|
198 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\MessageProvider' => $vendorDir . '/illuminate/contracts/Support/MessageProvider.php',
|
199 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\Renderable' => $vendorDir . '/illuminate/contracts/Support/Renderable.php',
|
200 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\Responsable' => $vendorDir . '/illuminate/contracts/Support/Responsable.php',
|
201 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\ValidatedData' => $vendorDir . '/illuminate/contracts/Support/ValidatedData.php',
|
202 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Translation\\HasLocalePreference' => $vendorDir . '/illuminate/contracts/Translation/HasLocalePreference.php',
|
203 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Translation\\Loader' => $vendorDir . '/illuminate/contracts/Translation/Loader.php',
|
204 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Translation\\Translator' => $vendorDir . '/illuminate/contracts/Translation/Translator.php',
|
205 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Validation\\DataAwareRule' => $vendorDir . '/illuminate/contracts/Validation/DataAwareRule.php',
|
206 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Validation\\Factory' => $vendorDir . '/illuminate/contracts/Validation/Factory.php',
|
207 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Validation\\ImplicitRule' => $vendorDir . '/illuminate/contracts/Validation/ImplicitRule.php',
|
208 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Validation\\Rule' => $vendorDir . '/illuminate/contracts/Validation/Rule.php',
|
209 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Validation\\UncompromisedVerifier' => $vendorDir . '/illuminate/contracts/Validation/UncompromisedVerifier.php',
|
210 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Validation\\ValidatesWhenResolved' => $vendorDir . '/illuminate/contracts/Validation/ValidatesWhenResolved.php',
|
211 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Validation\\Validator' => $vendorDir . '/illuminate/contracts/Validation/Validator.php',
|
212 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Validation\\ValidatorAwareRule' => $vendorDir . '/illuminate/contracts/Validation/ValidatorAwareRule.php',
|
213 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\View\\Engine' => $vendorDir . '/illuminate/contracts/View/Engine.php',
|
214 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\View\\Factory' => $vendorDir . '/illuminate/contracts/View/Factory.php',
|
215 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\View\\View' => $vendorDir . '/illuminate/contracts/View/View.php',
|
216 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\Arr' => $vendorDir . '/illuminate/collections/Arr.php',
|
217 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\Collection' => $vendorDir . '/illuminate/collections/Collection.php',
|
218 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\Enumerable' => $vendorDir . '/illuminate/collections/Enumerable.php',
|
219 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\HigherOrderCollectionProxy' => $vendorDir . '/illuminate/collections/HigherOrderCollectionProxy.php',
|
220 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\HigherOrderWhenProxy' => $vendorDir . '/illuminate/collections/HigherOrderWhenProxy.php',
|
221 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\ItemNotFoundException' => $vendorDir . '/illuminate/collections/ItemNotFoundException.php',
|
222 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\LazyCollection' => $vendorDir . '/illuminate/collections/LazyCollection.php',
|
223 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\MultipleItemsFoundException' => $vendorDir . '/illuminate/collections/MultipleItemsFoundException.php',
|
224 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\Traits\\EnumeratesValues' => $vendorDir . '/illuminate/collections/Traits/EnumeratesValues.php',
|
225 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\Traits\\Macroable' => $vendorDir . '/illuminate/macroable/Traits/Macroable.php',
|
226 |
-
'Data443\\gdpr\\framework\\Psr\\Container\\ContainerExceptionInterface' => $vendorDir . '/psr/container/src/ContainerExceptionInterface.php',
|
227 |
-
'Data443\\gdpr\\framework\\Psr\\Container\\ContainerInterface' => $vendorDir . '/psr/container/src/ContainerInterface.php',
|
228 |
-
'Data443\\gdpr\\framework\\Psr\\Container\\NotFoundExceptionInterface' => $vendorDir . '/psr/container/src/NotFoundExceptionInterface.php',
|
229 |
-
'Data443\\gdpr\\framework\\Psr\\SimpleCache\\CacheException' => $vendorDir . '/psr/simple-cache/src/CacheException.php',
|
230 |
-
'Data443\\gdpr\\framework\\Psr\\SimpleCache\\CacheInterface' => $vendorDir . '/psr/simple-cache/src/CacheInterface.php',
|
231 |
-
'Data443\\gdpr\\framework\\Psr\\SimpleCache\\InvalidArgumentException' => $vendorDir . '/psr/simple-cache/src/InvalidArgumentException.php',
|
232 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/autoload_files.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// autoload_files.php @generated by Composer
|
4 |
-
|
5 |
-
$vendorDir = dirname(dirname(__FILE__));
|
6 |
-
$baseDir = dirname($vendorDir);
|
7 |
-
|
8 |
-
return array(
|
9 |
-
'60799491728b879e74601d83e38b2cad' => $vendorDir . '/illuminate/collections/helpers.php',
|
10 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/autoload_namespaces.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// autoload_namespaces.php @generated by Composer
|
4 |
-
|
5 |
-
$vendorDir = dirname(dirname(__FILE__));
|
6 |
-
$baseDir = dirname($vendorDir);
|
7 |
-
|
8 |
-
return array(
|
9 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/autoload_psr4.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// autoload_psr4.php @generated by Composer
|
4 |
-
|
5 |
-
$vendorDir = dirname(dirname(__FILE__));
|
6 |
-
$baseDir = dirname($vendorDir);
|
7 |
-
|
8 |
-
return array(
|
9 |
-
'Data443\\gdpr\\framework\\Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
|
10 |
-
'Data443\\gdpr\\framework\\Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
|
11 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\' => array($vendorDir . '/illuminate/collections', $vendorDir . '/illuminate/macroable'),
|
12 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'),
|
13 |
-
'Data443\\gdpr\\framework\\Illuminate\\Container\\' => array($vendorDir . '/illuminate/container'),
|
14 |
-
'Data443\\gdpr\\framework\\Illuminate\\Config\\' => array($vendorDir . '/illuminate/config'),
|
15 |
-
'Codelight\\GDPR\\' => array($baseDir . '/src'),
|
16 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/autoload_real.php
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// autoload_real.php @generated by Composer
|
4 |
-
|
5 |
-
class ComposerAutoloaderInit6fcc4a44d7e9d84978c33c3077ec8efb
|
6 |
-
{
|
7 |
-
private static $loader;
|
8 |
-
|
9 |
-
public static function loadClassLoader($class)
|
10 |
-
{
|
11 |
-
if ('Composer\Autoload\ClassLoader' === $class) {
|
12 |
-
require __DIR__ . '/ClassLoader.php';
|
13 |
-
}
|
14 |
-
}
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @return \Composer\Autoload\ClassLoader
|
18 |
-
*/
|
19 |
-
public static function getLoader()
|
20 |
-
{
|
21 |
-
if (null !== self::$loader) {
|
22 |
-
return self::$loader;
|
23 |
-
}
|
24 |
-
|
25 |
-
require __DIR__ . '/platform_check.php';
|
26 |
-
|
27 |
-
spl_autoload_register(array('ComposerAutoloaderInit6fcc4a44d7e9d84978c33c3077ec8efb', 'loadClassLoader'), true, true);
|
28 |
-
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
-
spl_autoload_unregister(array('ComposerAutoloaderInit6fcc4a44d7e9d84978c33c3077ec8efb', 'loadClassLoader'));
|
30 |
-
|
31 |
-
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
-
if ($useStaticLoader) {
|
33 |
-
require __DIR__ . '/autoload_static.php';
|
34 |
-
|
35 |
-
call_user_func(\Composer\Autoload\ComposerStaticInit6fcc4a44d7e9d84978c33c3077ec8efb::getInitializer($loader));
|
36 |
-
} else {
|
37 |
-
$classMap = require __DIR__ . '/autoload_classmap.php';
|
38 |
-
if ($classMap) {
|
39 |
-
$loader->addClassMap($classMap);
|
40 |
-
}
|
41 |
-
}
|
42 |
-
|
43 |
-
$loader->setClassMapAuthoritative(true);
|
44 |
-
$loader->register(true);
|
45 |
-
|
46 |
-
if ($useStaticLoader) {
|
47 |
-
$includeFiles = Composer\Autoload\ComposerStaticInit6fcc4a44d7e9d84978c33c3077ec8efb::$files;
|
48 |
-
} else {
|
49 |
-
$includeFiles = require __DIR__ . '/autoload_files.php';
|
50 |
-
}
|
51 |
-
foreach ($includeFiles as $fileIdentifier => $file) {
|
52 |
-
composerRequire6fcc4a44d7e9d84978c33c3077ec8efb($fileIdentifier, $file);
|
53 |
-
}
|
54 |
-
|
55 |
-
return $loader;
|
56 |
-
}
|
57 |
-
}
|
58 |
-
|
59 |
-
function composerRequire6fcc4a44d7e9d84978c33c3077ec8efb($fileIdentifier, $file)
|
60 |
-
{
|
61 |
-
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
62 |
-
require $file;
|
63 |
-
|
64 |
-
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
65 |
-
}
|
66 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/autoload_static.php
DELETED
@@ -1,296 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// autoload_static.php @generated by Composer
|
4 |
-
|
5 |
-
namespace Composer\Autoload;
|
6 |
-
|
7 |
-
class ComposerStaticInit6fcc4a44d7e9d84978c33c3077ec8efb
|
8 |
-
{
|
9 |
-
public static $files = array (
|
10 |
-
'60799491728b879e74601d83e38b2cad' => __DIR__ . '/..' . '/illuminate/collections/helpers.php',
|
11 |
-
);
|
12 |
-
|
13 |
-
public static $prefixLengthsPsr4 = array (
|
14 |
-
'D' =>
|
15 |
-
array (
|
16 |
-
'Data443\\gdpr\\framework\\Psr\\SimpleCache\\' => 39,
|
17 |
-
'Data443\\gdpr\\framework\\Psr\\Container\\' => 37,
|
18 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\' => 42,
|
19 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\' => 44,
|
20 |
-
'Data443\\gdpr\\framework\\Illuminate\\Container\\' => 44,
|
21 |
-
'Data443\\gdpr\\framework\\Illuminate\\Config\\' => 41,
|
22 |
-
),
|
23 |
-
'C' =>
|
24 |
-
array (
|
25 |
-
'Codelight\\GDPR\\' => 15,
|
26 |
-
),
|
27 |
-
);
|
28 |
-
|
29 |
-
public static $prefixDirsPsr4 = array (
|
30 |
-
'Data443\\gdpr\\framework\\Psr\\SimpleCache\\' =>
|
31 |
-
array (
|
32 |
-
0 => __DIR__ . '/..' . '/psr/simple-cache/src',
|
33 |
-
),
|
34 |
-
'Data443\\gdpr\\framework\\Psr\\Container\\' =>
|
35 |
-
array (
|
36 |
-
0 => __DIR__ . '/..' . '/psr/container/src',
|
37 |
-
),
|
38 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\' =>
|
39 |
-
array (
|
40 |
-
0 => __DIR__ . '/..' . '/illuminate/collections',
|
41 |
-
1 => __DIR__ . '/..' . '/illuminate/macroable',
|
42 |
-
),
|
43 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\' =>
|
44 |
-
array (
|
45 |
-
0 => __DIR__ . '/..' . '/illuminate/contracts',
|
46 |
-
),
|
47 |
-
'Data443\\gdpr\\framework\\Illuminate\\Container\\' =>
|
48 |
-
array (
|
49 |
-
0 => __DIR__ . '/..' . '/illuminate/container',
|
50 |
-
),
|
51 |
-
'Data443\\gdpr\\framework\\Illuminate\\Config\\' =>
|
52 |
-
array (
|
53 |
-
0 => __DIR__ . '/..' . '/illuminate/config',
|
54 |
-
),
|
55 |
-
'Codelight\\GDPR\\' =>
|
56 |
-
array (
|
57 |
-
0 => __DIR__ . '/../..' . '/src',
|
58 |
-
),
|
59 |
-
);
|
60 |
-
|
61 |
-
public static $classMap = array (
|
62 |
-
'Codelight\\GDPR\\Admin\\AdminError' => __DIR__ . '/../..' . '/src/Admin/AdminError.php',
|
63 |
-
'Codelight\\GDPR\\Admin\\AdminHelper' => __DIR__ . '/../..' . '/src/Admin/AdminHelper.php',
|
64 |
-
'Codelight\\GDPR\\Admin\\AdminNotice' => __DIR__ . '/../..' . '/src/Admin/AdminNotice.php',
|
65 |
-
'Codelight\\GDPR\\Admin\\AdminPrivacySafe' => __DIR__ . '/../..' . '/src/Admin/AdminPrivacySafe.php',
|
66 |
-
'Codelight\\GDPR\\Admin\\AdminTab' => __DIR__ . '/../..' . '/src/Admin/AdminTab.php',
|
67 |
-
'Codelight\\GDPR\\Admin\\AdminTabGeneral' => __DIR__ . '/../..' . '/src/Admin/AdminTabGeneral.php',
|
68 |
-
'Codelight\\GDPR\\Admin\\AdminTabInterface' => __DIR__ . '/../..' . '/src/Admin/AdminTabInterface.php',
|
69 |
-
'Codelight\\GDPR\\Admin\\Modal' => __DIR__ . '/../..' . '/src/Admin/Modal.php',
|
70 |
-
'Codelight\\GDPR\\Admin\\WordpressAdmin' => __DIR__ . '/../..' . '/src/Admin/WordpressAdmin.php',
|
71 |
-
'Codelight\\GDPR\\Admin\\WordpressAdminPage' => __DIR__ . '/../..' . '/src/Admin/WordpressAdminPage.php',
|
72 |
-
'Codelight\\GDPR\\Components\\AdvancedIntegration\\AdminTabAdvancedIntegration' => __DIR__ . '/../..' . '/src/Components/AdvancedIntegration/AdminTabAdvancedIntegration.php',
|
73 |
-
'Codelight\\GDPR\\Components\\AdvancedIntegration\\AdvancedIntegration' => __DIR__ . '/../..' . '/src/Components/AdvancedIntegration/AdvancedIntegration.php',
|
74 |
-
'Codelight\\GDPR\\Components\\Consent\\AdminTabConsent' => __DIR__ . '/../..' . '/src/Components/Consent/AdminTabConsent.php',
|
75 |
-
'Codelight\\GDPR\\Components\\Consent\\ConsentAdmin' => __DIR__ . '/../..' . '/src/Components/Consent/ConsentAdmin.php',
|
76 |
-
'Codelight\\GDPR\\Components\\Consent\\ConsentManager' => __DIR__ . '/../..' . '/src/Components/Consent/ConsentManager.php',
|
77 |
-
'Codelight\\GDPR\\Components\\Consent\\UserConsentModel' => __DIR__ . '/../..' . '/src/Components/Consent/UserConsentModel.php',
|
78 |
-
'Codelight\\GDPR\\Components\\CookiePopup\\AdminTabCookiePopup' => __DIR__ . '/../..' . '/src/Components/CookiePopup/AdminTabCookiePopup.php',
|
79 |
-
'Codelight\\GDPR\\Components\\CookiePopup\\CookiePopup' => __DIR__ . '/../..' . '/src/Components/CookiePopup/CookiePopup.php',
|
80 |
-
'Codelight\\GDPR\\Components\\DoNotSell\\AdminTabDoNotSell' => __DIR__ . '/../..' . '/src/Components/DoNotSell/AdminTabDoNotSell.php',
|
81 |
-
'Codelight\\GDPR\\Components\\DoNotSell\\DoNotSell' => __DIR__ . '/../..' . '/src/Components/DoNotSell/DoNotSell.php',
|
82 |
-
'Codelight\\GDPR\\Components\\PrivacyManager\\AdminTabPrivacyManager' => __DIR__ . '/../..' . '/src/Components/PrivacyManager/AdminTabPrivacyManager.php',
|
83 |
-
'Codelight\\GDPR\\Components\\PrivacyManager\\PrivacyManager' => __DIR__ . '/../..' . '/src/Components/PrivacyManager/PrivacyManager.php',
|
84 |
-
'Codelight\\GDPR\\Components\\PrivacyPolicy\\AdminTabPrivacyPolicy' => __DIR__ . '/../..' . '/src/Components/PrivacyPolicy/AdminTabPrivacyPolicy.php',
|
85 |
-
'Codelight\\GDPR\\Components\\PrivacyPolicy\\PolicyGenerator' => __DIR__ . '/../..' . '/src/Components/PrivacyPolicy/PolicyGenerator.php',
|
86 |
-
'Codelight\\GDPR\\Components\\PrivacyPolicy\\PrivacyPolicy' => __DIR__ . '/../..' . '/src/Components/PrivacyPolicy/PrivacyPolicy.php',
|
87 |
-
'Codelight\\GDPR\\Components\\PrivacySafe\\AdminTabPrivacySafe' => __DIR__ . '/../..' . '/src/Components/PrivacySafe/AdminTabPrivacySafe.php',
|
88 |
-
'Codelight\\GDPR\\Components\\PrivacySafe\\PrivacySafe' => __DIR__ . '/../..' . '/src/Components/PrivacySafe/PrivacySafe.php',
|
89 |
-
'Codelight\\GDPR\\Components\\PrivacyToolsPage\\PrivacyToolsPage' => __DIR__ . '/../..' . '/src/Components/PrivacyToolsPage/PrivacyToolsPage.php',
|
90 |
-
'Codelight\\GDPR\\Components\\PrivacyToolsPage\\PrivacyToolsPageController' => __DIR__ . '/../..' . '/src/Components/PrivacyToolsPage/PrivacyToolsPageController.php',
|
91 |
-
'Codelight\\GDPR\\Components\\PrivacyToolsPage\\PrivacyToolsPageShortcode' => __DIR__ . '/../..' . '/src/Components/PrivacyToolsPage/PrivacyToolsPageShortcode.php',
|
92 |
-
'Codelight\\GDPR\\Components\\Support\\AdminTabSupport' => __DIR__ . '/../..' . '/src/Components/Support/AdminTabSupport.php',
|
93 |
-
'Codelight\\GDPR\\Components\\Support\\Support' => __DIR__ . '/../..' . '/src/Components/Support/Support.php',
|
94 |
-
'Codelight\\GDPR\\Components\\Themes\\Themes' => __DIR__ . '/../..' . '/src/Components/Themes/Themes.php',
|
95 |
-
'Codelight\\GDPR\\Components\\WordpressComments\\WordpressComments' => __DIR__ . '/../..' . '/src/Components/WordpressComments/WordpressComments.php',
|
96 |
-
'Codelight\\GDPR\\Components\\WordpressUser\\Controllers\\DashboardDataPageController' => __DIR__ . '/../..' . '/src/Components/WordpressUser/Controllers/DashboardDataPageController.php',
|
97 |
-
'Codelight\\GDPR\\Components\\WordpressUser\\Controllers\\DashboardProfilePageController' => __DIR__ . '/../..' . '/src/Components/WordpressUser/Controllers/DashboardProfilePageController.php',
|
98 |
-
'Codelight\\GDPR\\Components\\WordpressUser\\DataManager' => __DIR__ . '/../..' . '/src/Components/WordpressUser/DataManager.php',
|
99 |
-
'Codelight\\GDPR\\Components\\WordpressUser\\RegistrationForm' => __DIR__ . '/../..' . '/src/Components/WordpressUser/RegistrationForm.php',
|
100 |
-
'Codelight\\GDPR\\Components\\WordpressUser\\WordpressUser' => __DIR__ . '/../..' . '/src/Components/WordpressUser/WordpressUser.php',
|
101 |
-
'Codelight\\GDPR\\Config' => __DIR__ . '/../..' . '/src/Config.php',
|
102 |
-
'Codelight\\GDPR\\Container' => __DIR__ . '/../..' . '/src/Container.php',
|
103 |
-
'Codelight\\GDPR\\DataSubject\\AdminTabDataSubject' => __DIR__ . '/../..' . '/src/DataSubject/AdminTabDataSubject.php',
|
104 |
-
'Codelight\\GDPR\\DataSubject\\DataExporter' => __DIR__ . '/../..' . '/src/DataSubject/DataExporter.php',
|
105 |
-
'Codelight\\GDPR\\DataSubject\\DataRepository' => __DIR__ . '/../..' . '/src/DataSubject/DataRepository.php',
|
106 |
-
'Codelight\\GDPR\\DataSubject\\DataSubject' => __DIR__ . '/../..' . '/src/DataSubject/DataSubject.php',
|
107 |
-
'Codelight\\GDPR\\DataSubject\\DataSubjectAdmin' => __DIR__ . '/../..' . '/src/DataSubject/DataSubjectAdmin.php',
|
108 |
-
'Codelight\\GDPR\\DataSubject\\DataSubjectAuthenticator' => __DIR__ . '/../..' . '/src/DataSubject/DataSubjectAuthenticator.php',
|
109 |
-
'Codelight\\GDPR\\DataSubject\\DataSubjectIdentificator' => __DIR__ . '/../..' . '/src/DataSubject/DataSubjectIdentificator.php',
|
110 |
-
'Codelight\\GDPR\\DataSubject\\DataSubjectManager' => __DIR__ . '/../..' . '/src/DataSubject/DataSubjectManager.php',
|
111 |
-
'Codelight\\GDPR\\Database\\WordpressDatabase' => __DIR__ . '/../..' . '/src/Database/WordpressDatabase.php',
|
112 |
-
'Codelight\\GDPR\\Helpers' => __DIR__ . '/../..' . '/src/Helpers.php',
|
113 |
-
'Codelight\\GDPR\\Installer\\AdminInstallerNotice' => __DIR__ . '/../..' . '/src/Installer/AdminInstallerNotice.php',
|
114 |
-
'Codelight\\GDPR\\Installer\\Installer' => __DIR__ . '/../..' . '/src/Installer/Installer.php',
|
115 |
-
'Codelight\\GDPR\\Installer\\InstallerRouter' => __DIR__ . '/../..' . '/src/Installer/InstallerRouter.php',
|
116 |
-
'Codelight\\GDPR\\Installer\\InstallerStep' => __DIR__ . '/../..' . '/src/Installer/InstallerStep.php',
|
117 |
-
'Codelight\\GDPR\\Installer\\InstallerStepInterface' => __DIR__ . '/../..' . '/src/Installer/InstallerStepInterface.php',
|
118 |
-
'Codelight\\GDPR\\Installer\\InstallerWizard' => __DIR__ . '/../..' . '/src/Installer/InstallerWizard.php',
|
119 |
-
'Codelight\\GDPR\\Installer\\Steps\\ConfigurationPages' => __DIR__ . '/../..' . '/src/Installer/Steps/ConfigurationPages.php',
|
120 |
-
'Codelight\\GDPR\\Installer\\Steps\\ConfigurationSettings' => __DIR__ . '/../..' . '/src/Installer/Steps/ConfigurationSettings.php',
|
121 |
-
'Codelight\\GDPR\\Installer\\Steps\\Consent' => __DIR__ . '/../..' . '/src/Installer/Steps/Consent.php',
|
122 |
-
'Codelight\\GDPR\\Installer\\Steps\\Disclaimer' => __DIR__ . '/../..' . '/src/Installer/Steps/Disclaimer.php',
|
123 |
-
'Codelight\\GDPR\\Installer\\Steps\\Finish' => __DIR__ . '/../..' . '/src/Installer/Steps/Finish.php',
|
124 |
-
'Codelight\\GDPR\\Installer\\Steps\\Integrations' => __DIR__ . '/../..' . '/src/Installer/Steps/Integrations.php',
|
125 |
-
'Codelight\\GDPR\\Installer\\Steps\\PolicyContents' => __DIR__ . '/../..' . '/src/Installer/Steps/PolicyContents.php',
|
126 |
-
'Codelight\\GDPR\\Installer\\Steps\\PolicySettings' => __DIR__ . '/../..' . '/src/Installer/Steps/PolicySettings.php',
|
127 |
-
'Codelight\\GDPR\\Installer\\Steps\\PrivacySafe' => __DIR__ . '/../..' . '/src/Installer/Steps/PrivacySafe.php',
|
128 |
-
'Codelight\\GDPR\\Installer\\Steps\\Welcome' => __DIR__ . '/../..' . '/src/Installer/Steps/Welcome.php',
|
129 |
-
'Codelight\\GDPR\\Modules\\ContactForm7\\ContactForm7' => __DIR__ . '/../..' . '/src/Modules/ContactForm7/ContactForm7.php',
|
130 |
-
'Codelight\\GDPR\\Modules\\ContactForm7\\Flamingo' => __DIR__ . '/../..' . '/src/Modules/ContactForm7/Flamingo.php',
|
131 |
-
'Codelight\\GDPR\\Modules\\EddGdpr\\EddGdpr' => __DIR__ . '/../..' . '/src/Modules/EddGdpr/EddGdpr.php',
|
132 |
-
'Codelight\\GDPR\\Modules\\NewsletterGdpr\\NewsletterGdpr' => __DIR__ . '/../..' . '/src/Modules/NewsletterGdpr/NewsletterGdpr.php',
|
133 |
-
'Codelight\\GDPR\\Modules\\WPML\\WPML' => __DIR__ . '/../..' . '/src/Modules/WPML/WPML.php',
|
134 |
-
'Codelight\\GDPR\\Modules\\WooCommerceGdpr\\WooCommerceGdpr' => __DIR__ . '/../..' . '/src/Modules/WooCommerceGdpr/WooCommerceGdpr.php',
|
135 |
-
'Codelight\\GDPR\\Options\\Options' => __DIR__ . '/../..' . '/src/Options/Options.php',
|
136 |
-
'Codelight\\GDPR\\Options\\OptionsBase' => __DIR__ . '/../..' . '/src/Options/OptionsBase.php',
|
137 |
-
'Codelight\\GDPR\\Router' => __DIR__ . '/../..' . '/src/Router.php',
|
138 |
-
'Codelight\\GDPR\\Setup' => __DIR__ . '/../..' . '/src/Setup.php',
|
139 |
-
'Codelight\\GDPR\\SetupAdmin' => __DIR__ . '/../..' . '/src/SetupAdmin.php',
|
140 |
-
'Codelight\\GDPR\\Updater\\Updater' => __DIR__ . '/../..' . '/src/Updater/Updater.php',
|
141 |
-
'Codelight\\GDPR\\View' => __DIR__ . '/../..' . '/src/View.php',
|
142 |
-
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
143 |
-
'Data443\\gdpr\\framework\\Illuminate\\Config\\Repository' => __DIR__ . '/..' . '/illuminate/config/Repository.php',
|
144 |
-
'Data443\\gdpr\\framework\\Illuminate\\Container\\BoundMethod' => __DIR__ . '/..' . '/illuminate/container/BoundMethod.php',
|
145 |
-
'Data443\\gdpr\\framework\\Illuminate\\Container\\Container' => __DIR__ . '/..' . '/illuminate/container/Container.php',
|
146 |
-
'Data443\\gdpr\\framework\\Illuminate\\Container\\ContextualBindingBuilder' => __DIR__ . '/..' . '/illuminate/container/ContextualBindingBuilder.php',
|
147 |
-
'Data443\\gdpr\\framework\\Illuminate\\Container\\EntryNotFoundException' => __DIR__ . '/..' . '/illuminate/container/EntryNotFoundException.php',
|
148 |
-
'Data443\\gdpr\\framework\\Illuminate\\Container\\RewindableGenerator' => __DIR__ . '/..' . '/illuminate/container/RewindableGenerator.php',
|
149 |
-
'Data443\\gdpr\\framework\\Illuminate\\Container\\Util' => __DIR__ . '/..' . '/illuminate/container/Util.php',
|
150 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\Access\\Authorizable' => __DIR__ . '/..' . '/illuminate/contracts/Auth/Access/Authorizable.php',
|
151 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\Access\\Gate' => __DIR__ . '/..' . '/illuminate/contracts/Auth/Access/Gate.php',
|
152 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\Authenticatable' => __DIR__ . '/..' . '/illuminate/contracts/Auth/Authenticatable.php',
|
153 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\CanResetPassword' => __DIR__ . '/..' . '/illuminate/contracts/Auth/CanResetPassword.php',
|
154 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Auth/Factory.php',
|
155 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\Guard' => __DIR__ . '/..' . '/illuminate/contracts/Auth/Guard.php',
|
156 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\Middleware\\AuthenticatesRequests' => __DIR__ . '/..' . '/illuminate/contracts/Auth/Middleware/AuthenticatesRequests.php',
|
157 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\MustVerifyEmail' => __DIR__ . '/..' . '/illuminate/contracts/Auth/MustVerifyEmail.php',
|
158 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\PasswordBroker' => __DIR__ . '/..' . '/illuminate/contracts/Auth/PasswordBroker.php',
|
159 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\PasswordBrokerFactory' => __DIR__ . '/..' . '/illuminate/contracts/Auth/PasswordBrokerFactory.php',
|
160 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\StatefulGuard' => __DIR__ . '/..' . '/illuminate/contracts/Auth/StatefulGuard.php',
|
161 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\SupportsBasicAuth' => __DIR__ . '/..' . '/illuminate/contracts/Auth/SupportsBasicAuth.php',
|
162 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Auth\\UserProvider' => __DIR__ . '/..' . '/illuminate/contracts/Auth/UserProvider.php',
|
163 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Broadcasting\\Broadcaster' => __DIR__ . '/..' . '/illuminate/contracts/Broadcasting/Broadcaster.php',
|
164 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Broadcasting\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Broadcasting/Factory.php',
|
165 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Broadcasting\\HasBroadcastChannel' => __DIR__ . '/..' . '/illuminate/contracts/Broadcasting/HasBroadcastChannel.php',
|
166 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Broadcasting\\ShouldBroadcast' => __DIR__ . '/..' . '/illuminate/contracts/Broadcasting/ShouldBroadcast.php',
|
167 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Broadcasting\\ShouldBroadcastNow' => __DIR__ . '/..' . '/illuminate/contracts/Broadcasting/ShouldBroadcastNow.php',
|
168 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Bus\\Dispatcher' => __DIR__ . '/..' . '/illuminate/contracts/Bus/Dispatcher.php',
|
169 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Bus\\QueueingDispatcher' => __DIR__ . '/..' . '/illuminate/contracts/Bus/QueueingDispatcher.php',
|
170 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Cache\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Cache/Factory.php',
|
171 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Cache\\Lock' => __DIR__ . '/..' . '/illuminate/contracts/Cache/Lock.php',
|
172 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Cache\\LockProvider' => __DIR__ . '/..' . '/illuminate/contracts/Cache/LockProvider.php',
|
173 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Cache\\LockTimeoutException' => __DIR__ . '/..' . '/illuminate/contracts/Cache/LockTimeoutException.php',
|
174 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Cache\\Repository' => __DIR__ . '/..' . '/illuminate/contracts/Cache/Repository.php',
|
175 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Cache\\Store' => __DIR__ . '/..' . '/illuminate/contracts/Cache/Store.php',
|
176 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Config\\Repository' => __DIR__ . '/..' . '/illuminate/contracts/Config/Repository.php',
|
177 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Console\\Application' => __DIR__ . '/..' . '/illuminate/contracts/Console/Application.php',
|
178 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Console\\Kernel' => __DIR__ . '/..' . '/illuminate/contracts/Console/Kernel.php',
|
179 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Container\\BindingResolutionException' => __DIR__ . '/..' . '/illuminate/contracts/Container/BindingResolutionException.php',
|
180 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Container\\CircularDependencyException' => __DIR__ . '/..' . '/illuminate/contracts/Container/CircularDependencyException.php',
|
181 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Container\\Container' => __DIR__ . '/..' . '/illuminate/contracts/Container/Container.php',
|
182 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Container\\ContextualBindingBuilder' => __DIR__ . '/..' . '/illuminate/contracts/Container/ContextualBindingBuilder.php',
|
183 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Cookie\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Cookie/Factory.php',
|
184 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Cookie\\QueueingFactory' => __DIR__ . '/..' . '/illuminate/contracts/Cookie/QueueingFactory.php',
|
185 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Database\\Eloquent\\Castable' => __DIR__ . '/..' . '/illuminate/contracts/Database/Eloquent/Castable.php',
|
186 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes' => __DIR__ . '/..' . '/illuminate/contracts/Database/Eloquent/CastsAttributes.php',
|
187 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Database\\Eloquent\\CastsInboundAttributes' => __DIR__ . '/..' . '/illuminate/contracts/Database/Eloquent/CastsInboundAttributes.php',
|
188 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Database\\Eloquent\\DeviatesCastableAttributes' => __DIR__ . '/..' . '/illuminate/contracts/Database/Eloquent/DeviatesCastableAttributes.php',
|
189 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Database\\Eloquent\\SerializesCastableAttributes' => __DIR__ . '/..' . '/illuminate/contracts/Database/Eloquent/SerializesCastableAttributes.php',
|
190 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Database\\Eloquent\\SupportsPartialRelations' => __DIR__ . '/..' . '/illuminate/contracts/Database/Eloquent/SupportsPartialRelations.php',
|
191 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Database\\Events\\MigrationEvent' => __DIR__ . '/..' . '/illuminate/contracts/Database/Events/MigrationEvent.php',
|
192 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Database\\ModelIdentifier' => __DIR__ . '/..' . '/illuminate/contracts/Database/ModelIdentifier.php',
|
193 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Debug\\ExceptionHandler' => __DIR__ . '/..' . '/illuminate/contracts/Debug/ExceptionHandler.php',
|
194 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Encryption\\DecryptException' => __DIR__ . '/..' . '/illuminate/contracts/Encryption/DecryptException.php',
|
195 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Encryption\\EncryptException' => __DIR__ . '/..' . '/illuminate/contracts/Encryption/EncryptException.php',
|
196 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Encryption\\Encrypter' => __DIR__ . '/..' . '/illuminate/contracts/Encryption/Encrypter.php',
|
197 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Encryption\\StringEncrypter' => __DIR__ . '/..' . '/illuminate/contracts/Encryption/StringEncrypter.php',
|
198 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Events\\Dispatcher' => __DIR__ . '/..' . '/illuminate/contracts/Events/Dispatcher.php',
|
199 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Filesystem\\Cloud' => __DIR__ . '/..' . '/illuminate/contracts/Filesystem/Cloud.php',
|
200 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Filesystem\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Filesystem/Factory.php',
|
201 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Filesystem\\FileExistsException' => __DIR__ . '/..' . '/illuminate/contracts/Filesystem/FileExistsException.php',
|
202 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Filesystem\\FileNotFoundException' => __DIR__ . '/..' . '/illuminate/contracts/Filesystem/FileNotFoundException.php',
|
203 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Filesystem\\Filesystem' => __DIR__ . '/..' . '/illuminate/contracts/Filesystem/Filesystem.php',
|
204 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Filesystem\\LockTimeoutException' => __DIR__ . '/..' . '/illuminate/contracts/Filesystem/LockTimeoutException.php',
|
205 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Foundation\\Application' => __DIR__ . '/..' . '/illuminate/contracts/Foundation/Application.php',
|
206 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Foundation\\CachesConfiguration' => __DIR__ . '/..' . '/illuminate/contracts/Foundation/CachesConfiguration.php',
|
207 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Foundation\\CachesRoutes' => __DIR__ . '/..' . '/illuminate/contracts/Foundation/CachesRoutes.php',
|
208 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Hashing\\Hasher' => __DIR__ . '/..' . '/illuminate/contracts/Hashing/Hasher.php',
|
209 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Http\\Kernel' => __DIR__ . '/..' . '/illuminate/contracts/Http/Kernel.php',
|
210 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Mail\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Mail/Factory.php',
|
211 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Mail\\MailQueue' => __DIR__ . '/..' . '/illuminate/contracts/Mail/MailQueue.php',
|
212 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Mail\\Mailable' => __DIR__ . '/..' . '/illuminate/contracts/Mail/Mailable.php',
|
213 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Mail\\Mailer' => __DIR__ . '/..' . '/illuminate/contracts/Mail/Mailer.php',
|
214 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Notifications\\Dispatcher' => __DIR__ . '/..' . '/illuminate/contracts/Notifications/Dispatcher.php',
|
215 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Notifications\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Notifications/Factory.php',
|
216 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Pagination\\CursorPaginator' => __DIR__ . '/..' . '/illuminate/contracts/Pagination/CursorPaginator.php',
|
217 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Pagination\\LengthAwarePaginator' => __DIR__ . '/..' . '/illuminate/contracts/Pagination/LengthAwarePaginator.php',
|
218 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Pagination\\Paginator' => __DIR__ . '/..' . '/illuminate/contracts/Pagination/Paginator.php',
|
219 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Pipeline\\Hub' => __DIR__ . '/..' . '/illuminate/contracts/Pipeline/Hub.php',
|
220 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Pipeline\\Pipeline' => __DIR__ . '/..' . '/illuminate/contracts/Pipeline/Pipeline.php',
|
221 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\ClearableQueue' => __DIR__ . '/..' . '/illuminate/contracts/Queue/ClearableQueue.php',
|
222 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\EntityNotFoundException' => __DIR__ . '/..' . '/illuminate/contracts/Queue/EntityNotFoundException.php',
|
223 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\EntityResolver' => __DIR__ . '/..' . '/illuminate/contracts/Queue/EntityResolver.php',
|
224 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Queue/Factory.php',
|
225 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\Job' => __DIR__ . '/..' . '/illuminate/contracts/Queue/Job.php',
|
226 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\Monitor' => __DIR__ . '/..' . '/illuminate/contracts/Queue/Monitor.php',
|
227 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\Queue' => __DIR__ . '/..' . '/illuminate/contracts/Queue/Queue.php',
|
228 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\QueueableCollection' => __DIR__ . '/..' . '/illuminate/contracts/Queue/QueueableCollection.php',
|
229 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\QueueableEntity' => __DIR__ . '/..' . '/illuminate/contracts/Queue/QueueableEntity.php',
|
230 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\ShouldBeEncrypted' => __DIR__ . '/..' . '/illuminate/contracts/Queue/ShouldBeEncrypted.php',
|
231 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\ShouldBeUnique' => __DIR__ . '/..' . '/illuminate/contracts/Queue/ShouldBeUnique.php',
|
232 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\ShouldBeUniqueUntilProcessing' => __DIR__ . '/..' . '/illuminate/contracts/Queue/ShouldBeUniqueUntilProcessing.php',
|
233 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Queue\\ShouldQueue' => __DIR__ . '/..' . '/illuminate/contracts/Queue/ShouldQueue.php',
|
234 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Redis\\Connection' => __DIR__ . '/..' . '/illuminate/contracts/Redis/Connection.php',
|
235 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Redis\\Connector' => __DIR__ . '/..' . '/illuminate/contracts/Redis/Connector.php',
|
236 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Redis\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Redis/Factory.php',
|
237 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Redis\\LimiterTimeoutException' => __DIR__ . '/..' . '/illuminate/contracts/Redis/LimiterTimeoutException.php',
|
238 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Routing\\BindingRegistrar' => __DIR__ . '/..' . '/illuminate/contracts/Routing/BindingRegistrar.php',
|
239 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Routing\\Registrar' => __DIR__ . '/..' . '/illuminate/contracts/Routing/Registrar.php',
|
240 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Routing\\ResponseFactory' => __DIR__ . '/..' . '/illuminate/contracts/Routing/ResponseFactory.php',
|
241 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Routing\\UrlGenerator' => __DIR__ . '/..' . '/illuminate/contracts/Routing/UrlGenerator.php',
|
242 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Routing\\UrlRoutable' => __DIR__ . '/..' . '/illuminate/contracts/Routing/UrlRoutable.php',
|
243 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Session\\Session' => __DIR__ . '/..' . '/illuminate/contracts/Session/Session.php',
|
244 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\Arrayable' => __DIR__ . '/..' . '/illuminate/contracts/Support/Arrayable.php',
|
245 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\CanBeEscapedWhenCastToString' => __DIR__ . '/..' . '/illuminate/contracts/Support/CanBeEscapedWhenCastToString.php',
|
246 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\DeferrableProvider' => __DIR__ . '/..' . '/illuminate/contracts/Support/DeferrableProvider.php',
|
247 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\DeferringDisplayableValue' => __DIR__ . '/..' . '/illuminate/contracts/Support/DeferringDisplayableValue.php',
|
248 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\Htmlable' => __DIR__ . '/..' . '/illuminate/contracts/Support/Htmlable.php',
|
249 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\Jsonable' => __DIR__ . '/..' . '/illuminate/contracts/Support/Jsonable.php',
|
250 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\MessageBag' => __DIR__ . '/..' . '/illuminate/contracts/Support/MessageBag.php',
|
251 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\MessageProvider' => __DIR__ . '/..' . '/illuminate/contracts/Support/MessageProvider.php',
|
252 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\Renderable' => __DIR__ . '/..' . '/illuminate/contracts/Support/Renderable.php',
|
253 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\Responsable' => __DIR__ . '/..' . '/illuminate/contracts/Support/Responsable.php',
|
254 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Support\\ValidatedData' => __DIR__ . '/..' . '/illuminate/contracts/Support/ValidatedData.php',
|
255 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Translation\\HasLocalePreference' => __DIR__ . '/..' . '/illuminate/contracts/Translation/HasLocalePreference.php',
|
256 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Translation\\Loader' => __DIR__ . '/..' . '/illuminate/contracts/Translation/Loader.php',
|
257 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Translation\\Translator' => __DIR__ . '/..' . '/illuminate/contracts/Translation/Translator.php',
|
258 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Validation\\DataAwareRule' => __DIR__ . '/..' . '/illuminate/contracts/Validation/DataAwareRule.php',
|
259 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Validation\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/Validation/Factory.php',
|
260 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Validation\\ImplicitRule' => __DIR__ . '/..' . '/illuminate/contracts/Validation/ImplicitRule.php',
|
261 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Validation\\Rule' => __DIR__ . '/..' . '/illuminate/contracts/Validation/Rule.php',
|
262 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Validation\\UncompromisedVerifier' => __DIR__ . '/..' . '/illuminate/contracts/Validation/UncompromisedVerifier.php',
|
263 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Validation\\ValidatesWhenResolved' => __DIR__ . '/..' . '/illuminate/contracts/Validation/ValidatesWhenResolved.php',
|
264 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Validation\\Validator' => __DIR__ . '/..' . '/illuminate/contracts/Validation/Validator.php',
|
265 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\Validation\\ValidatorAwareRule' => __DIR__ . '/..' . '/illuminate/contracts/Validation/ValidatorAwareRule.php',
|
266 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\View\\Engine' => __DIR__ . '/..' . '/illuminate/contracts/View/Engine.php',
|
267 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\View\\Factory' => __DIR__ . '/..' . '/illuminate/contracts/View/Factory.php',
|
268 |
-
'Data443\\gdpr\\framework\\Illuminate\\Contracts\\View\\View' => __DIR__ . '/..' . '/illuminate/contracts/View/View.php',
|
269 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\Arr' => __DIR__ . '/..' . '/illuminate/collections/Arr.php',
|
270 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\Collection' => __DIR__ . '/..' . '/illuminate/collections/Collection.php',
|
271 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\Enumerable' => __DIR__ . '/..' . '/illuminate/collections/Enumerable.php',
|
272 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\HigherOrderCollectionProxy' => __DIR__ . '/..' . '/illuminate/collections/HigherOrderCollectionProxy.php',
|
273 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\HigherOrderWhenProxy' => __DIR__ . '/..' . '/illuminate/collections/HigherOrderWhenProxy.php',
|
274 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\ItemNotFoundException' => __DIR__ . '/..' . '/illuminate/collections/ItemNotFoundException.php',
|
275 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\LazyCollection' => __DIR__ . '/..' . '/illuminate/collections/LazyCollection.php',
|
276 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\MultipleItemsFoundException' => __DIR__ . '/..' . '/illuminate/collections/MultipleItemsFoundException.php',
|
277 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\Traits\\EnumeratesValues' => __DIR__ . '/..' . '/illuminate/collections/Traits/EnumeratesValues.php',
|
278 |
-
'Data443\\gdpr\\framework\\Illuminate\\Support\\Traits\\Macroable' => __DIR__ . '/..' . '/illuminate/macroable/Traits/Macroable.php',
|
279 |
-
'Data443\\gdpr\\framework\\Psr\\Container\\ContainerExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerExceptionInterface.php',
|
280 |
-
'Data443\\gdpr\\framework\\Psr\\Container\\ContainerInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerInterface.php',
|
281 |
-
'Data443\\gdpr\\framework\\Psr\\Container\\NotFoundExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/NotFoundExceptionInterface.php',
|
282 |
-
'Data443\\gdpr\\framework\\Psr\\SimpleCache\\CacheException' => __DIR__ . '/..' . '/psr/simple-cache/src/CacheException.php',
|
283 |
-
'Data443\\gdpr\\framework\\Psr\\SimpleCache\\CacheInterface' => __DIR__ . '/..' . '/psr/simple-cache/src/CacheInterface.php',
|
284 |
-
'Data443\\gdpr\\framework\\Psr\\SimpleCache\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/simple-cache/src/InvalidArgumentException.php',
|
285 |
-
);
|
286 |
-
|
287 |
-
public static function getInitializer(ClassLoader $loader)
|
288 |
-
{
|
289 |
-
return \Closure::bind(function () use ($loader) {
|
290 |
-
$loader->prefixLengthsPsr4 = ComposerStaticInit6fcc4a44d7e9d84978c33c3077ec8efb::$prefixLengthsPsr4;
|
291 |
-
$loader->prefixDirsPsr4 = ComposerStaticInit6fcc4a44d7e9d84978c33c3077ec8efb::$prefixDirsPsr4;
|
292 |
-
$loader->classMap = ComposerStaticInit6fcc4a44d7e9d84978c33c3077ec8efb::$classMap;
|
293 |
-
|
294 |
-
}, null, ClassLoader::class);
|
295 |
-
}
|
296 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installed.json
DELETED
@@ -1,373 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"packages": [
|
3 |
-
{
|
4 |
-
"name": "illuminate\/collections",
|
5 |
-
"version": "v8.74.0",
|
6 |
-
"version_normalized": "8.74.0.0",
|
7 |
-
"source": {
|
8 |
-
"type": "git",
|
9 |
-
"url": "https:\/\/github.com\/illuminate\/collections.git",
|
10 |
-
"reference": "f292b77824b42cd28decc7327e7c2e24c3806371"
|
11 |
-
},
|
12 |
-
"dist": {
|
13 |
-
"type": "zip",
|
14 |
-
"url": "https:\/\/api.github.com\/repos\/illuminate\/collections\/zipball\/f292b77824b42cd28decc7327e7c2e24c3806371",
|
15 |
-
"reference": "f292b77824b42cd28decc7327e7c2e24c3806371",
|
16 |
-
"shasum": ""
|
17 |
-
},
|
18 |
-
"require": {
|
19 |
-
"illuminate\/contracts": "^8.0",
|
20 |
-
"illuminate\/macroable": "^8.0",
|
21 |
-
"php": "^7.3|^8.0"
|
22 |
-
},
|
23 |
-
"suggest": {
|
24 |
-
"symfony\/var-dumper": "Required to use the dump method (^5.4)."
|
25 |
-
},
|
26 |
-
"time": "2021-11-30T14:29:03+00:00",
|
27 |
-
"type": "library",
|
28 |
-
"extra": {
|
29 |
-
"branch-alias": {
|
30 |
-
"dev-master": "8.x-dev"
|
31 |
-
}
|
32 |
-
},
|
33 |
-
"installation-source": "dist",
|
34 |
-
"autoload": {
|
35 |
-
"psr-4": {
|
36 |
-
"Data443\\gdpr\\framework\\Illuminate\\Support\\": ""
|
37 |
-
},
|
38 |
-
"files": [
|
39 |
-
"helpers.php"
|
40 |
-
]
|
41 |
-
},
|
42 |
-
"notification-url": "https:\/\/packagist.org\/downloads\/",
|
43 |
-
"license": [
|
44 |
-
"MIT"
|
45 |
-
],
|
46 |
-
"authors": [
|
47 |
-
{
|
48 |
-
"name": "Taylor Otwell",
|
49 |
-
"email": "taylor@laravel.com"
|
50 |
-
}
|
51 |
-
],
|
52 |
-
"description": "The Illuminate Collections package.",
|
53 |
-
"homepage": "https:\/\/laravel.com",
|
54 |
-
"support": {
|
55 |
-
"issues": "https:\/\/github.com\/laravel\/framework\/issues",
|
56 |
-
"source": "https:\/\/github.com\/laravel\/framework"
|
57 |
-
},
|
58 |
-
"install-path": "..\/illuminate\/collections"
|
59 |
-
},
|
60 |
-
{
|
61 |
-
"name": "illuminate\/config",
|
62 |
-
"version": "v8.74.0",
|
63 |
-
"version_normalized": "8.74.0.0",
|
64 |
-
"source": {
|
65 |
-
"type": "git",
|
66 |
-
"url": "https:\/\/github.com\/illuminate\/config.git",
|
67 |
-
"reference": "70973cbbe0cb524658b6eeaa2386dd5b71de4b02"
|
68 |
-
},
|
69 |
-
"dist": {
|
70 |
-
"type": "zip",
|
71 |
-
"url": "https:\/\/api.github.com\/repos\/illuminate\/config\/zipball\/70973cbbe0cb524658b6eeaa2386dd5b71de4b02",
|
72 |
-
"reference": "70973cbbe0cb524658b6eeaa2386dd5b71de4b02",
|
73 |
-
"shasum": ""
|
74 |
-
},
|
75 |
-
"require": {
|
76 |
-
"illuminate\/collections": "^8.0",
|
77 |
-
"illuminate\/contracts": "^8.0",
|
78 |
-
"php": "^7.3|^8.0"
|
79 |
-
},
|
80 |
-
"time": "2021-08-03T13:42:24+00:00",
|
81 |
-
"type": "library",
|
82 |
-
"extra": {
|
83 |
-
"branch-alias": {
|
84 |
-
"dev-master": "8.x-dev"
|
85 |
-
}
|
86 |
-
},
|
87 |
-
"installation-source": "dist",
|
88 |
-
"autoload": {
|
89 |
-
"psr-4": {
|
90 |
-
"Data443\\gdpr\\framework\\Illuminate\\Config\\": ""
|
91 |
-
}
|
92 |
-
},
|
93 |
-
"notification-url": "https:\/\/packagist.org\/downloads\/",
|
94 |
-
"license": [
|
95 |
-
"MIT"
|
96 |
-
],
|
97 |
-
"authors": [
|
98 |
-
{
|
99 |
-
"name": "Taylor Otwell",
|
100 |
-
"email": "taylor@laravel.com"
|
101 |
-
}
|
102 |
-
],
|
103 |
-
"description": "The Illuminate Config package.",
|
104 |
-
"homepage": "https:\/\/laravel.com",
|
105 |
-
"support": {
|
106 |
-
"issues": "https:\/\/github.com\/laravel\/framework\/issues",
|
107 |
-
"source": "https:\/\/github.com\/laravel\/framework"
|
108 |
-
},
|
109 |
-
"install-path": "..\/illuminate\/config"
|
110 |
-
},
|
111 |
-
{
|
112 |
-
"name": "illuminate\/container",
|
113 |
-
"version": "v8.74.0",
|
114 |
-
"version_normalized": "8.74.0.0",
|
115 |
-
"source": {
|
116 |
-
"type": "git",
|
117 |
-
"url": "https:\/\/github.com\/illuminate\/container.git",
|
118 |
-
"reference": "6ac391bb27391706c5f921b85060aa2c4ca03fae"
|
119 |
-
},
|
120 |
-
"dist": {
|
121 |
-
"type": "zip",
|
122 |
-
"url": "https:\/\/api.github.com\/repos\/illuminate\/container\/zipball\/6ac391bb27391706c5f921b85060aa2c4ca03fae",
|
123 |
-
"reference": "6ac391bb27391706c5f921b85060aa2c4ca03fae",
|
124 |
-
"shasum": ""
|
125 |
-
},
|
126 |
-
"require": {
|
127 |
-
"illuminate\/contracts": "^8.0",
|
128 |
-
"php": "^7.3|^8.0",
|
129 |
-
"psr\/container": "^1.0"
|
130 |
-
},
|
131 |
-
"provide": {
|
132 |
-
"psr\/container-implementation": "1.0"
|
133 |
-
},
|
134 |
-
"time": "2021-11-17T15:04:30+00:00",
|
135 |
-
"type": "library",
|
136 |
-
"extra": {
|
137 |
-
"branch-alias": {
|
138 |
-
"dev-master": "8.x-dev"
|
139 |
-
}
|
140 |
-
},
|
141 |
-
"installation-source": "dist",
|
142 |
-
"autoload": {
|
143 |
-
"psr-4": {
|
144 |
-
"Data443\\gdpr\\framework\\Illuminate\\Container\\": ""
|
145 |
-
}
|
146 |
-
},
|
147 |
-
"notification-url": "https:\/\/packagist.org\/downloads\/",
|
148 |
-
"license": [
|
149 |
-
"MIT"
|
150 |
-
],
|
151 |
-
"authors": [
|
152 |
-
{
|
153 |
-
"name": "Taylor Otwell",
|
154 |
-
"email": "taylor@laravel.com"
|
155 |
-
}
|
156 |
-
],
|
157 |
-
"description": "The Illuminate Container package.",
|
158 |
-
"homepage": "https:\/\/laravel.com",
|
159 |
-
"support": {
|
160 |
-
"issues": "https:\/\/github.com\/laravel\/framework\/issues",
|
161 |
-
"source": "https:\/\/github.com\/laravel\/framework"
|
162 |
-
},
|
163 |
-
"install-path": "..\/illuminate\/container"
|
164 |
-
},
|
165 |
-
{
|
166 |
-
"name": "illuminate\/contracts",
|
167 |
-
"version": "v8.74.0",
|
168 |
-
"version_normalized": "8.74.0.0",
|
169 |
-
"source": {
|
170 |
-
"type": "git",
|
171 |
-
"url": "https:\/\/github.com\/illuminate\/contracts.git",
|
172 |
-
"reference": "b0886ec05a63b204634d64d0b39d5b78a7c06f81"
|
173 |
-
},
|
174 |
-
"dist": {
|
175 |
-
"type": "zip",
|
176 |
-
"url": "https:\/\/api.github.com\/repos\/illuminate\/contracts\/zipball\/b0886ec05a63b204634d64d0b39d5b78a7c06f81",
|
177 |
-
"reference": "b0886ec05a63b204634d64d0b39d5b78a7c06f81",
|
178 |
-
"shasum": ""
|
179 |
-
},
|
180 |
-
"require": {
|
181 |
-
"php": "^7.3|^8.0",
|
182 |
-
"psr\/container": "^1.0",
|
183 |
-
"psr\/simple-cache": "^1.0"
|
184 |
-
},
|
185 |
-
"time": "2021-11-17T15:04:30+00:00",
|
186 |
-
"type": "library",
|
187 |
-
"extra": {
|
188 |
-
"branch-alias": {
|
189 |
-
"dev-master": "8.x-dev"
|
190 |
-
}
|
191 |
-
},
|
192 |
-
"installation-source": "dist",
|
193 |
-
"autoload": {
|
194 |
-
"psr-4": {
|
195 |
-
"Data443\\gdpr\\framework\\Illuminate\\Contracts\\": ""
|
196 |
-
}
|
197 |
-
},
|
198 |
-
"notification-url": "https:\/\/packagist.org\/downloads\/",
|
199 |
-
"license": [
|
200 |
-
"MIT"
|
201 |
-
],
|
202 |
-
"authors": [
|
203 |
-
{
|
204 |
-
"name": "Taylor Otwell",
|
205 |
-
"email": "taylor@laravel.com"
|
206 |
-
}
|
207 |
-
],
|
208 |
-
"description": "The Illuminate Contracts package.",
|
209 |
-
"homepage": "https:\/\/laravel.com",
|
210 |
-
"support": {
|
211 |
-
"issues": "https:\/\/github.com\/laravel\/framework\/issues",
|
212 |
-
"source": "https:\/\/github.com\/laravel\/framework"
|
213 |
-
},
|
214 |
-
"install-path": "..\/illuminate\/contracts"
|
215 |
-
},
|
216 |
-
{
|
217 |
-
"name": "illuminate\/macroable",
|
218 |
-
"version": "v8.74.0",
|
219 |
-
"version_normalized": "8.74.0.0",
|
220 |
-
"source": {
|
221 |
-
"type": "git",
|
222 |
-
"url": "https:\/\/github.com\/illuminate\/macroable.git",
|
223 |
-
"reference": "aed81891a6e046fdee72edd497f822190f61c162"
|
224 |
-
},
|
225 |
-
"dist": {
|
226 |
-
"type": "zip",
|
227 |
-
"url": "https:\/\/api.github.com\/repos\/illuminate\/macroable\/zipball\/aed81891a6e046fdee72edd497f822190f61c162",
|
228 |
-
"reference": "aed81891a6e046fdee72edd497f822190f61c162",
|
229 |
-
"shasum": ""
|
230 |
-
},
|
231 |
-
"require": {
|
232 |
-
"php": "^7.3|^8.0"
|
233 |
-
},
|
234 |
-
"time": "2021-11-16T13:57:03+00:00",
|
235 |
-
"type": "library",
|
236 |
-
"extra": {
|
237 |
-
"branch-alias": {
|
238 |
-
"dev-master": "8.x-dev"
|
239 |
-
}
|
240 |
-
},
|
241 |
-
"installation-source": "dist",
|
242 |
-
"autoload": {
|
243 |
-
"psr-4": {
|
244 |
-
"Data443\\gdpr\\framework\\Illuminate\\Support\\": ""
|
245 |
-
}
|
246 |
-
},
|
247 |
-
"notification-url": "https:\/\/packagist.org\/downloads\/",
|
248 |
-
"license": [
|
249 |
-
"MIT"
|
250 |
-
],
|
251 |
-
"authors": [
|
252 |
-
{
|
253 |
-
"name": "Taylor Otwell",
|
254 |
-
"email": "taylor@laravel.com"
|
255 |
-
}
|
256 |
-
],
|
257 |
-
"description": "The Illuminate Macroable package.",
|
258 |
-
"homepage": "https:\/\/laravel.com",
|
259 |
-
"support": {
|
260 |
-
"issues": "https:\/\/github.com\/laravel\/framework\/issues",
|
261 |
-
"source": "https:\/\/github.com\/laravel\/framework"
|
262 |
-
},
|
263 |
-
"install-path": "..\/illuminate\/macroable"
|
264 |
-
},
|
265 |
-
{
|
266 |
-
"name": "psr\/container",
|
267 |
-
"version": "1.1.1",
|
268 |
-
"version_normalized": "1.1.1.0",
|
269 |
-
"source": {
|
270 |
-
"type": "git",
|
271 |
-
"url": "https:\/\/github.com\/php-fig\/container.git",
|
272 |
-
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
|
273 |
-
},
|
274 |
-
"dist": {
|
275 |
-
"type": "zip",
|
276 |
-
"url": "https:\/\/api.github.com\/repos\/php-fig\/container\/zipball\/8622567409010282b7aeebe4bb841fe98b58dcaf",
|
277 |
-
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
|
278 |
-
"shasum": ""
|
279 |
-
},
|
280 |
-
"require": {
|
281 |
-
"php": ">=7.2.0"
|
282 |
-
},
|
283 |
-
"time": "2021-03-05T17:36:06+00:00",
|
284 |
-
"type": "library",
|
285 |
-
"installation-source": "dist",
|
286 |
-
"autoload": {
|
287 |
-
"psr-4": {
|
288 |
-
"Data443\\gdpr\\framework\\Psr\\Container\\": "src\/"
|
289 |
-
}
|
290 |
-
},
|
291 |
-
"notification-url": "https:\/\/packagist.org\/downloads\/",
|
292 |
-
"license": [
|
293 |
-
"MIT"
|
294 |
-
],
|
295 |
-
"authors": [
|
296 |
-
{
|
297 |
-
"name": "PHP-FIG",
|
298 |
-
"homepage": "https:\/\/www.php-fig.org\/"
|
299 |
-
}
|
300 |
-
],
|
301 |
-
"description": "Common Container Interface (PHP FIG PSR-11)",
|
302 |
-
"homepage": "https:\/\/github.com\/php-fig\/container",
|
303 |
-
"keywords": [
|
304 |
-
"PSR-11",
|
305 |
-
"container",
|
306 |
-
"container-interface",
|
307 |
-
"container-interop",
|
308 |
-
"psr"
|
309 |
-
],
|
310 |
-
"support": {
|
311 |
-
"issues": "https:\/\/github.com\/php-fig\/container\/issues",
|
312 |
-
"source": "https:\/\/github.com\/php-fig\/container\/tree\/1.1.1"
|
313 |
-
},
|
314 |
-
"install-path": "..\/psr\/container"
|
315 |
-
},
|
316 |
-
{
|
317 |
-
"name": "psr\/simple-cache",
|
318 |
-
"version": "1.0.1",
|
319 |
-
"version_normalized": "1.0.1.0",
|
320 |
-
"source": {
|
321 |
-
"type": "git",
|
322 |
-
"url": "https:\/\/github.com\/php-fig\/simple-cache.git",
|
323 |
-
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
|
324 |
-
},
|
325 |
-
"dist": {
|
326 |
-
"type": "zip",
|
327 |
-
"url": "https:\/\/api.github.com\/repos\/php-fig\/simple-cache\/zipball\/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
|
328 |
-
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
|
329 |
-
"shasum": ""
|
330 |
-
},
|
331 |
-
"require": {
|
332 |
-
"php": ">=5.3.0"
|
333 |
-
},
|
334 |
-
"time": "2017-10-23T01:57:42+00:00",
|
335 |
-
"type": "library",
|
336 |
-
"extra": {
|
337 |
-
"branch-alias": {
|
338 |
-
"dev-master": "1.0.x-dev"
|
339 |
-
}
|
340 |
-
},
|
341 |
-
"installation-source": "dist",
|
342 |
-
"autoload": {
|
343 |
-
"psr-4": {
|
344 |
-
"Data443\\gdpr\\framework\\Psr\\SimpleCache\\": "src\/"
|
345 |
-
}
|
346 |
-
},
|
347 |
-
"notification-url": "https:\/\/packagist.org\/downloads\/",
|
348 |
-
"license": [
|
349 |
-
"MIT"
|
350 |
-
],
|
351 |
-
"authors": [
|
352 |
-
{
|
353 |
-
"name": "PHP-FIG",
|
354 |
-
"homepage": "http:\/\/www.php-fig.org\/"
|
355 |
-
}
|
356 |
-
],
|
357 |
-
"description": "Common interfaces for simple caching",
|
358 |
-
"keywords": [
|
359 |
-
"cache",
|
360 |
-
"caching",
|
361 |
-
"psr",
|
362 |
-
"psr-16",
|
363 |
-
"simple-cache"
|
364 |
-
],
|
365 |
-
"support": {
|
366 |
-
"source": "https:\/\/github.com\/php-fig\/simple-cache\/tree\/master"
|
367 |
-
},
|
368 |
-
"install-path": "..\/psr\/simple-cache"
|
369 |
-
}
|
370 |
-
],
|
371 |
-
"dev": false,
|
372 |
-
"dev-package-names": []
|
373 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installed.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework;
|
4 |
-
|
5 |
-
return array('root' => array('pretty_version' => 'dev-free', 'version' => 'dev-free', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'reference' => '8fd38d3014aad7f62111b5fe8dd956ce0ef1f408', 'name' => '__root__', 'dev' => \false), 'versions' => array('__root__' => array('pretty_version' => 'dev-free', 'version' => 'dev-free', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'reference' => '8fd38d3014aad7f62111b5fe8dd956ce0ef1f408', 'dev_requirement' => \false), 'illuminate/collections' => array('pretty_version' => 'v8.74.0', 'version' => '8.74.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/collections', 'aliases' => array(), 'reference' => 'f292b77824b42cd28decc7327e7c2e24c3806371', 'dev_requirement' => \false), 'illuminate/config' => array('pretty_version' => 'v8.74.0', 'version' => '8.74.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/config', 'aliases' => array(), 'reference' => '70973cbbe0cb524658b6eeaa2386dd5b71de4b02', 'dev_requirement' => \false), 'illuminate/container' => array('pretty_version' => 'v8.74.0', 'version' => '8.74.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/container', 'aliases' => array(), 'reference' => '6ac391bb27391706c5f921b85060aa2c4ca03fae', 'dev_requirement' => \false), 'illuminate/contracts' => array('pretty_version' => 'v8.74.0', 'version' => '8.74.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/contracts', 'aliases' => array(), 'reference' => 'b0886ec05a63b204634d64d0b39d5b78a7c06f81', 'dev_requirement' => \false), 'illuminate/macroable' => array('pretty_version' => 'v8.74.0', 'version' => '8.74.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/macroable', 'aliases' => array(), 'reference' => 'aed81891a6e046fdee72edd497f822190f61c162', 'dev_requirement' => \false), 'psr/container' => array('pretty_version' => '1.1.1', 'version' => '1.1.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf', 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/simple-cache' => array('pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/simple-cache', 'aliases' => array(), 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b', 'dev_requirement' => \false)));
|
|
|
|
|
|
|
|
|
|
vendor/composer/platform_check.php
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// platform_check.php @generated by Composer
|
4 |
-
|
5 |
-
$issues = array();
|
6 |
-
|
7 |
-
if (!(PHP_VERSION_ID >= 70300)) {
|
8 |
-
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.3.0". You are running ' . PHP_VERSION . '.';
|
9 |
-
}
|
10 |
-
|
11 |
-
if ($issues) {
|
12 |
-
if (!headers_sent()) {
|
13 |
-
header('HTTP/1.1 500 Internal Server Error');
|
14 |
-
}
|
15 |
-
if (!ini_get('display_errors')) {
|
16 |
-
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
17 |
-
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
|
18 |
-
} elseif (!headers_sent()) {
|
19 |
-
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
|
20 |
-
}
|
21 |
-
}
|
22 |
-
trigger_error(
|
23 |
-
'Composer detected issues in your platform: ' . implode(' ', $issues),
|
24 |
-
E_USER_ERROR
|
25 |
-
);
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/collections/Arr.php
DELETED
@@ -1,611 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Support;
|
4 |
-
|
5 |
-
use ArrayAccess;
|
6 |
-
use Data443\gdpr\framework\Illuminate\Support\Traits\Macroable;
|
7 |
-
use InvalidArgumentException;
|
8 |
-
class Arr
|
9 |
-
{
|
10 |
-
use Macroable;
|
11 |
-
/**
|
12 |
-
* Determine whether the given value is array accessible.
|
13 |
-
*
|
14 |
-
* @param mixed $value
|
15 |
-
* @return bool
|
16 |
-
*/
|
17 |
-
public static function accessible($value)
|
18 |
-
{
|
19 |
-
return \is_array($value) || $value instanceof ArrayAccess;
|
20 |
-
}
|
21 |
-
/**
|
22 |
-
* Add an element to an array using "dot" notation if it doesn't exist.
|
23 |
-
*
|
24 |
-
* @param array $array
|
25 |
-
* @param string $key
|
26 |
-
* @param mixed $value
|
27 |
-
* @return array
|
28 |
-
*/
|
29 |
-
public static function add($array, $key, $value)
|
30 |
-
{
|
31 |
-
if (\is_null(static::get($array, $key))) {
|
32 |
-
static::set($array, $key, $value);
|
33 |
-
}
|
34 |
-
return $array;
|
35 |
-
}
|
36 |
-
/**
|
37 |
-
* Collapse an array of arrays into a single array.
|
38 |
-
*
|
39 |
-
* @param iterable $array
|
40 |
-
* @return array
|
41 |
-
*/
|
42 |
-
public static function collapse($array)
|
43 |
-
{
|
44 |
-
$results = [];
|
45 |
-
foreach ($array as $values) {
|
46 |
-
if ($values instanceof Collection) {
|
47 |
-
$values = $values->all();
|
48 |
-
} elseif (!\is_array($values)) {
|
49 |
-
continue;
|
50 |
-
}
|
51 |
-
$results[] = $values;
|
52 |
-
}
|
53 |
-
return \array_merge([], ...$results);
|
54 |
-
}
|
55 |
-
/**
|
56 |
-
* Cross join the given arrays, returning all possible permutations.
|
57 |
-
*
|
58 |
-
* @param iterable ...$arrays
|
59 |
-
* @return array
|
60 |
-
*/
|
61 |
-
public static function crossJoin(...$arrays)
|
62 |
-
{
|
63 |
-
$results = [[]];
|
64 |
-
foreach ($arrays as $index => $array) {
|
65 |
-
$append = [];
|
66 |
-
foreach ($results as $product) {
|
67 |
-
foreach ($array as $item) {
|
68 |
-
$product[$index] = $item;
|
69 |
-
$append[] = $product;
|
70 |
-
}
|
71 |
-
}
|
72 |
-
$results = $append;
|
73 |
-
}
|
74 |
-
return $results;
|
75 |
-
}
|
76 |
-
/**
|
77 |
-
* Divide an array into two arrays. One with keys and the other with values.
|
78 |
-
*
|
79 |
-
* @param array $array
|
80 |
-
* @return array
|
81 |
-
*/
|
82 |
-
public static function divide($array)
|
83 |
-
{
|
84 |
-
return [\array_keys($array), \array_values($array)];
|
85 |
-
}
|
86 |
-
/**
|
87 |
-
* Flatten a multi-dimensional associative array with dots.
|
88 |
-
*
|
89 |
-
* @param iterable $array
|
90 |
-
* @param string $prepend
|
91 |
-
* @return array
|
92 |
-
*/
|
93 |
-
public static function dot($array, $prepend = '')
|
94 |
-
{
|
95 |
-
$results = [];
|
96 |
-
foreach ($array as $key => $value) {
|
97 |
-
if (\is_array($value) && !empty($value)) {
|
98 |
-
$results = \array_merge($results, static::dot($value, $prepend . $key . '.'));
|
99 |
-
} else {
|
100 |
-
$results[$prepend . $key] = $value;
|
101 |
-
}
|
102 |
-
}
|
103 |
-
return $results;
|
104 |
-
}
|
105 |
-
/**
|
106 |
-
* Convert a flatten "dot" notation array into an expanded array.
|
107 |
-
*
|
108 |
-
* @param iterable $array
|
109 |
-
* @return array
|
110 |
-
*/
|
111 |
-
public static function undot($array)
|
112 |
-
{
|
113 |
-
$results = [];
|
114 |
-
foreach ($array as $key => $value) {
|
115 |
-
static::set($results, $key, $value);
|
116 |
-
}
|
117 |
-
return $results;
|
118 |
-
}
|
119 |
-
/**
|
120 |
-
* Get all of the given array except for a specified array of keys.
|
121 |
-
*
|
122 |
-
* @param array $array
|
123 |
-
* @param array|string $keys
|
124 |
-
* @return array
|
125 |
-
*/
|
126 |
-
public static function except($array, $keys)
|
127 |
-
{
|
128 |
-
static::forget($array, $keys);
|
129 |
-
return $array;
|
130 |
-
}
|
131 |
-
/**
|
132 |
-
* Determine if the given key exists in the provided array.
|
133 |
-
*
|
134 |
-
* @param \ArrayAccess|array $array
|
135 |
-
* @param string|int $key
|
136 |
-
* @return bool
|
137 |
-
*/
|
138 |
-
public static function exists($array, $key)
|
139 |
-
{
|
140 |
-
if ($array instanceof Enumerable) {
|
141 |
-
return $array->has($key);
|
142 |
-
}
|
143 |
-
if ($array instanceof ArrayAccess) {
|
144 |
-
return $array->offsetExists($key);
|
145 |
-
}
|
146 |
-
return \array_key_exists($key, $array);
|
147 |
-
}
|
148 |
-
/**
|
149 |
-
* Return the first element in an array passing a given truth test.
|
150 |
-
*
|
151 |
-
* @param iterable $array
|
152 |
-
* @param callable|null $callback
|
153 |
-
* @param mixed $default
|
154 |
-
* @return mixed
|
155 |
-
*/
|
156 |
-
public static function first($array, callable $callback = null, $default = null)
|
157 |
-
{
|
158 |
-
if (\is_null($callback)) {
|
159 |
-
if (empty($array)) {
|
160 |
-
return value($default);
|
161 |
-
}
|
162 |
-
foreach ($array as $item) {
|
163 |
-
return $item;
|
164 |
-
}
|
165 |
-
}
|
166 |
-
foreach ($array as $key => $value) {
|
167 |
-
if ($callback($value, $key)) {
|
168 |
-
return $value;
|
169 |
-
}
|
170 |
-
}
|
171 |
-
return value($default);
|
172 |
-
}
|
173 |
-
/**
|
174 |
-
* Return the last element in an array passing a given truth test.
|
175 |
-
*
|
176 |
-
* @param array $array
|
177 |
-
* @param callable|null $callback
|
178 |
-
* @param mixed $default
|
179 |
-
* @return mixed
|
180 |
-
*/
|
181 |
-
public static function last($array, callable $callback = null, $default = null)
|
182 |
-
{
|
183 |
-
if (\is_null($callback)) {
|
184 |
-
return empty($array) ? value($default) : \end($array);
|
185 |
-
}
|
186 |
-
return static::first(\array_reverse($array, \true), $callback, $default);
|
187 |
-
}
|
188 |
-
/**
|
189 |
-
* Flatten a multi-dimensional array into a single level.
|
190 |
-
*
|
191 |
-
* @param iterable $array
|
192 |
-
* @param int $depth
|
193 |
-
* @return array
|
194 |
-
*/
|
195 |
-
public static function flatten($array, $depth = \INF)
|
196 |
-
{
|
197 |
-
$result = [];
|
198 |
-
foreach ($array as $item) {
|
199 |
-
$item = $item instanceof Collection ? $item->all() : $item;
|
200 |
-
if (!\is_array($item)) {
|
201 |
-
$result[] = $item;
|
202 |
-
} else {
|
203 |
-
$values = $depth === 1 ? \array_values($item) : static::flatten($item, $depth - 1);
|
204 |
-
foreach ($values as $value) {
|
205 |
-
$result[] = $value;
|
206 |
-
}
|
207 |
-
}
|
208 |
-
}
|
209 |
-
return $result;
|
210 |
-
}
|
211 |
-
/**
|
212 |
-
* Remove one or many array items from a given array using "dot" notation.
|
213 |
-
*
|
214 |
-
* @param array $array
|
215 |
-
* @param array|string $keys
|
216 |
-
* @return void
|
217 |
-
*/
|
218 |
-
public static function forget(&$array, $keys)
|
219 |
-
{
|
220 |
-
$original =& $array;
|
221 |
-
$keys = (array) $keys;
|
222 |
-
if (\count($keys) === 0) {
|
223 |
-
return;
|
224 |
-
}
|
225 |
-
foreach ($keys as $key) {
|
226 |
-
// if the exact key exists in the top-level, remove it
|
227 |
-
if (static::exists($array, $key)) {
|
228 |
-
unset($array[$key]);
|
229 |
-
continue;
|
230 |
-
}
|
231 |
-
$parts = \explode('.', $key);
|
232 |
-
// clean up before each pass
|
233 |
-
$array =& $original;
|
234 |
-
while (\count($parts) > 1) {
|
235 |
-
$part = \array_shift($parts);
|
236 |
-
if (isset($array[$part]) && \is_array($array[$part])) {
|
237 |
-
$array =& $array[$part];
|
238 |
-
} else {
|
239 |
-
continue 2;
|
240 |
-
}
|
241 |
-
}
|
242 |
-
unset($array[\array_shift($parts)]);
|
243 |
-
}
|
244 |
-
}
|
245 |
-
/**
|
246 |
-
* Get an item from an array using "dot" notation.
|
247 |
-
*
|
248 |
-
* @param \ArrayAccess|array $array
|
249 |
-
* @param string|int|null $key
|
250 |
-
* @param mixed $default
|
251 |
-
* @return mixed
|
252 |
-
*/
|
253 |
-
public static function get($array, $key, $default = null)
|
254 |
-
{
|
255 |
-
if (!static::accessible($array)) {
|
256 |
-
return value($default);
|
257 |
-
}
|
258 |
-
if (\is_null($key)) {
|
259 |
-
return $array;
|
260 |
-
}
|
261 |
-
if (static::exists($array, $key)) {
|
262 |
-
return $array[$key];
|
263 |
-
}
|
264 |
-
if (\strpos($key, '.') === \false) {
|
265 |
-
return $array[$key] ?? value($default);
|
266 |
-
}
|
267 |
-
foreach (\explode('.', $key) as $segment) {
|
268 |
-
if (static::accessible($array) && static::exists($array, $segment)) {
|
269 |
-
$array = $array[$segment];
|
270 |
-
} else {
|
271 |
-
return value($default);
|
272 |
-
}
|
273 |
-
}
|
274 |
-
return $array;
|
275 |
-
}
|
276 |
-
/**
|
277 |
-
* Check if an item or items exist in an array using "dot" notation.
|
278 |
-
*
|
279 |
-
* @param \ArrayAccess|array $array
|
280 |
-
* @param string|array $keys
|
281 |
-
* @return bool
|
282 |
-
*/
|
283 |
-
public static function has($array, $keys)
|
284 |
-
{
|
285 |
-
$keys = (array) $keys;
|
286 |
-
if (!$array || $keys === []) {
|
287 |
-
return \false;
|
288 |
-
}
|
289 |
-
foreach ($keys as $key) {
|
290 |
-
$subKeyArray = $array;
|
291 |
-
if (static::exists($array, $key)) {
|
292 |
-
continue;
|
293 |
-
}
|
294 |
-
foreach (\explode('.', $key) as $segment) {
|
295 |
-
if (static::accessible($subKeyArray) && static::exists($subKeyArray, $segment)) {
|
296 |
-
$subKeyArray = $subKeyArray[$segment];
|
297 |
-
} else {
|
298 |
-
return \false;
|
299 |
-
}
|
300 |
-
}
|
301 |
-
}
|
302 |
-
return \true;
|
303 |
-
}
|
304 |
-
/**
|
305 |
-
* Determine if any of the keys exist in an array using "dot" notation.
|
306 |
-
*
|
307 |
-
* @param \ArrayAccess|array $array
|
308 |
-
* @param string|array $keys
|
309 |
-
* @return bool
|
310 |
-
*/
|
311 |
-
public static function hasAny($array, $keys)
|
312 |
-
{
|
313 |
-
if (\is_null($keys)) {
|
314 |
-
return \false;
|
315 |
-
}
|
316 |
-
$keys = (array) $keys;
|
317 |
-
if (!$array) {
|
318 |
-
return \false;
|
319 |
-
}
|
320 |
-
if ($keys === []) {
|
321 |
-
return \false;
|
322 |
-
}
|
323 |
-
foreach ($keys as $key) {
|
324 |
-
if (static::has($array, $key)) {
|
325 |
-
return \true;
|
326 |
-
}
|
327 |
-
}
|
328 |
-
return \false;
|
329 |
-
}
|
330 |
-
/**
|
331 |
-
* Determines if an array is associative.
|
332 |
-
*
|
333 |
-
* An array is "associative" if it doesn't have sequential numerical keys beginning with zero.
|
334 |
-
*
|
335 |
-
* @param array $array
|
336 |
-
* @return bool
|
337 |
-
*/
|
338 |
-
public static function isAssoc(array $array)
|
339 |
-
{
|
340 |
-
$keys = \array_keys($array);
|
341 |
-
return \array_keys($keys) !== $keys;
|
342 |
-
}
|
343 |
-
/**
|
344 |
-
* Determines if an array is a list.
|
345 |
-
*
|
346 |
-
* An array is a "list" if all array keys are sequential integers starting from 0 with no gaps in between.
|
347 |
-
*
|
348 |
-
* @param array $array
|
349 |
-
* @return bool
|
350 |
-
*/
|
351 |
-
public static function isList($array)
|
352 |
-
{
|
353 |
-
return !self::isAssoc($array);
|
354 |
-
}
|
355 |
-
/**
|
356 |
-
* Get a subset of the items from the given array.
|
357 |
-
*
|
358 |
-
* @param array $array
|
359 |
-
* @param array|string $keys
|
360 |
-
* @return array
|
361 |
-
*/
|
362 |
-
public static function only($array, $keys)
|
363 |
-
{
|
364 |
-
return \array_intersect_key($array, \array_flip((array) $keys));
|
365 |
-
}
|
366 |
-
/**
|
367 |
-
* Pluck an array of values from an array.
|
368 |
-
*
|
369 |
-
* @param iterable $array
|
370 |
-
* @param string|array|int|null $value
|
371 |
-
* @param string|array|null $key
|
372 |
-
* @return array
|
373 |
-
*/
|
374 |
-
public static function pluck($array, $value, $key = null)
|
375 |
-
{
|
376 |
-
$results = [];
|
377 |
-
[$value, $key] = static::explodePluckParameters($value, $key);
|
378 |
-
foreach ($array as $item) {
|
379 |
-
$itemValue = data_get($item, $value);
|
380 |
-
// If the key is "null", we will just append the value to the array and keep
|
381 |
-
// looping. Otherwise we will key the array using the value of the key we
|
382 |
-
// received from the developer. Then we'll return the final array form.
|
383 |
-
if (\is_null($key)) {
|
384 |
-
$results[] = $itemValue;
|
385 |
-
} else {
|
386 |
-
$itemKey = data_get($item, $key);
|
387 |
-
if (\is_object($itemKey) && \method_exists($itemKey, '__toString')) {
|
388 |
-
$itemKey = (string) $itemKey;
|
389 |
-
}
|
390 |
-
$results[$itemKey] = $itemValue;
|
391 |
-
}
|
392 |
-
}
|
393 |
-
return $results;
|
394 |
-
}
|
395 |
-
/**
|
396 |
-
* Explode the "value" and "key" arguments passed to "pluck".
|
397 |
-
*
|
398 |
-
* @param string|array $value
|
399 |
-
* @param string|array|null $key
|
400 |
-
* @return array
|
401 |
-
*/
|
402 |
-
protected static function explodePluckParameters($value, $key)
|
403 |
-
{
|
404 |
-
$value = \is_string($value) ? \explode('.', $value) : $value;
|
405 |
-
$key = \is_null($key) || \is_array($key) ? $key : \explode('.', $key);
|
406 |
-
return [$value, $key];
|
407 |
-
}
|
408 |
-
/**
|
409 |
-
* Push an item onto the beginning of an array.
|
410 |
-
*
|
411 |
-
* @param array $array
|
412 |
-
* @param mixed $value
|
413 |
-
* @param mixed $key
|
414 |
-
* @return array
|
415 |
-
*/
|
416 |
-
public static function prepend($array, $value, $key = null)
|
417 |
-
{
|
418 |
-
if (\func_num_args() == 2) {
|
419 |
-
\array_unshift($array, $value);
|
420 |
-
} else {
|
421 |
-
$array = [$key => $value] + $array;
|
422 |
-
}
|
423 |
-
return $array;
|
424 |
-
}
|
425 |
-
/**
|
426 |
-
* Get a value from the array, and remove it.
|
427 |
-
*
|
428 |
-
* @param array $array
|
429 |
-
* @param string $key
|
430 |
-
* @param mixed $default
|
431 |
-
* @return mixed
|
432 |
-
*/
|
433 |
-
public static function pull(&$array, $key, $default = null)
|
434 |
-
{
|
435 |
-
$value = static::get($array, $key, $default);
|
436 |
-
static::forget($array, $key);
|
437 |
-
return $value;
|
438 |
-
}
|
439 |
-
/**
|
440 |
-
* Convert the array into a query string.
|
441 |
-
*
|
442 |
-
* @param array $array
|
443 |
-
* @return string
|
444 |
-
*/
|
445 |
-
public static function query($array)
|
446 |
-
{
|
447 |
-
return \http_build_query($array, '', '&', \PHP_QUERY_RFC3986);
|
448 |
-
}
|
449 |
-
/**
|
450 |
-
* Get one or a specified number of random values from an array.
|
451 |
-
*
|
452 |
-
* @param array $array
|
453 |
-
* @param int|null $number
|
454 |
-
* @param bool|false $preserveKeys
|
455 |
-
* @return mixed
|
456 |
-
*
|
457 |
-
* @throws \InvalidArgumentException
|
458 |
-
*/
|
459 |
-
public static function random($array, $number = null, $preserveKeys = \false)
|
460 |
-
{
|
461 |
-
$requested = \is_null($number) ? 1 : $number;
|
462 |
-
$count = \count($array);
|
463 |
-
if ($requested > $count) {
|
464 |
-
throw new InvalidArgumentException("You requested {$requested} items, but there are only {$count} items available.");
|
465 |
-
}
|
466 |
-
if (\is_null($number)) {
|
467 |
-
return $array[\array_rand($array)];
|
468 |
-
}
|
469 |
-
if ((int) $number === 0) {
|
470 |
-
return [];
|
471 |
-
}
|
472 |
-
$keys = \array_rand($array, $number);
|
473 |
-
$results = [];
|
474 |
-
if ($preserveKeys) {
|
475 |
-
foreach ((array) $keys as $key) {
|
476 |
-
$results[$key] = $array[$key];
|
477 |
-
}
|
478 |
-
} else {
|
479 |
-
foreach ((array) $keys as $key) {
|
480 |
-
$results[] = $array[$key];
|
481 |
-
}
|
482 |
-
}
|
483 |
-
return $results;
|
484 |
-
}
|
485 |
-
/**
|
486 |
-
* Set an array item to a given value using "dot" notation.
|
487 |
-
*
|
488 |
-
* If no key is given to the method, the entire array will be replaced.
|
489 |
-
*
|
490 |
-
* @param array $array
|
491 |
-
* @param string|null $key
|
492 |
-
* @param mixed $value
|
493 |
-
* @return array
|
494 |
-
*/
|
495 |
-
public static function set(&$array, $key, $value)
|
496 |
-
{
|
497 |
-
if (\is_null($key)) {
|
498 |
-
return $array = $value;
|
499 |
-
}
|
500 |
-
$keys = \explode('.', $key);
|
501 |
-
foreach ($keys as $i => $key) {
|
502 |
-
if (\count($keys) === 1) {
|
503 |
-
break;
|
504 |
-
}
|
505 |
-
unset($keys[$i]);
|
506 |
-
// If the key doesn't exist at this depth, we will just create an empty array
|
507 |
-
// to hold the next value, allowing us to create the arrays to hold final
|
508 |
-
// values at the correct depth. Then we'll keep digging into the array.
|
509 |
-
if (!isset($array[$key]) || !\is_array($array[$key])) {
|
510 |
-
$array[$key] = [];
|
511 |
-
}
|
512 |
-
$array =& $array[$key];
|
513 |
-
}
|
514 |
-
$array[\array_shift($keys)] = $value;
|
515 |
-
return $array;
|
516 |
-
}
|
517 |
-
/**
|
518 |
-
* Shuffle the given array and return the result.
|
519 |
-
*
|
520 |
-
* @param array $array
|
521 |
-
* @param int|null $seed
|
522 |
-
* @return array
|
523 |
-
*/
|
524 |
-
public static function shuffle($array, $seed = null)
|
525 |
-
{
|
526 |
-
if (\is_null($seed)) {
|
527 |
-
\shuffle($array);
|
528 |
-
} else {
|
529 |
-
\mt_srand($seed);
|
530 |
-
\shuffle($array);
|
531 |
-
\mt_srand();
|
532 |
-
}
|
533 |
-
return $array;
|
534 |
-
}
|
535 |
-
/**
|
536 |
-
* Sort the array using the given callback or "dot" notation.
|
537 |
-
*
|
538 |
-
* @param array $array
|
539 |
-
* @param callable|array|string|null $callback
|
540 |
-
* @return array
|
541 |
-
*/
|
542 |
-
public static function sort($array, $callback = null)
|
543 |
-
{
|
544 |
-
return Collection::make($array)->sortBy($callback)->all();
|
545 |
-
}
|
546 |
-
/**
|
547 |
-
* Recursively sort an array by keys and values.
|
548 |
-
*
|
549 |
-
* @param array $array
|
550 |
-
* @param int $options
|
551 |
-
* @param bool $descending
|
552 |
-
* @return array
|
553 |
-
*/
|
554 |
-
public static function sortRecursive($array, $options = \SORT_REGULAR, $descending = \false)
|
555 |
-
{
|
556 |
-
foreach ($array as &$value) {
|
557 |
-
if (\is_array($value)) {
|
558 |
-
$value = static::sortRecursive($value, $options, $descending);
|
559 |
-
}
|
560 |
-
}
|
561 |
-
if (static::isAssoc($array)) {
|
562 |
-
$descending ? \krsort($array, $options) : \ksort($array, $options);
|
563 |
-
} else {
|
564 |
-
$descending ? \rsort($array, $options) : \sort($array, $options);
|
565 |
-
}
|
566 |
-
return $array;
|
567 |
-
}
|
568 |
-
/**
|
569 |
-
* Conditionally compile classes from an array into a CSS class list.
|
570 |
-
*
|
571 |
-
* @param array $array
|
572 |
-
* @return string
|
573 |
-
*/
|
574 |
-
public static function toCssClasses($array)
|
575 |
-
{
|
576 |
-
$classList = static::wrap($array);
|
577 |
-
$classes = [];
|
578 |
-
foreach ($classList as $class => $constraint) {
|
579 |
-
if (\is_numeric($class)) {
|
580 |
-
$classes[] = $constraint;
|
581 |
-
} elseif ($constraint) {
|
582 |
-
$classes[] = $class;
|
583 |
-
}
|
584 |
-
}
|
585 |
-
return \implode(' ', $classes);
|
586 |
-
}
|
587 |
-
/**
|
588 |
-
* Filter the array using the given callback.
|
589 |
-
*
|
590 |
-
* @param array $array
|
591 |
-
* @param callable $callback
|
592 |
-
* @return array
|
593 |
-
*/
|
594 |
-
public static function where($array, callable $callback)
|
595 |
-
{
|
596 |
-
return \array_filter($array, $callback, \ARRAY_FILTER_USE_BOTH);
|
597 |
-
}
|
598 |
-
/**
|
599 |
-
* If the given value is not an array and not null, wrap it in one.
|
600 |
-
*
|
601 |
-
* @param mixed $value
|
602 |
-
* @return array
|
603 |
-
*/
|
604 |
-
public static function wrap($value)
|
605 |
-
{
|
606 |
-
if (\is_null($value)) {
|
607 |
-
return [];
|
608 |
-
}
|
609 |
-
return \is_array($value) ? $value : [$value];
|
610 |
-
}
|
611 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/collections/Collection.php
DELETED
@@ -1,1365 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Support;
|
4 |
-
|
5 |
-
use ArrayAccess;
|
6 |
-
use ArrayIterator;
|
7 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Support\CanBeEscapedWhenCastToString;
|
8 |
-
use Data443\gdpr\framework\Illuminate\Support\Traits\EnumeratesValues;
|
9 |
-
use Data443\gdpr\framework\Illuminate\Support\Traits\Macroable;
|
10 |
-
use stdClass;
|
11 |
-
class Collection implements ArrayAccess, CanBeEscapedWhenCastToString, Enumerable
|
12 |
-
{
|
13 |
-
use EnumeratesValues, Macroable;
|
14 |
-
/**
|
15 |
-
* The items contained in the collection.
|
16 |
-
*
|
17 |
-
* @var array
|
18 |
-
*/
|
19 |
-
protected $items = [];
|
20 |
-
/**
|
21 |
-
* Create a new collection.
|
22 |
-
*
|
23 |
-
* @param mixed $items
|
24 |
-
* @return void
|
25 |
-
*/
|
26 |
-
public function __construct($items = [])
|
27 |
-
{
|
28 |
-
$this->items = $this->getArrayableItems($items);
|
29 |
-
}
|
30 |
-
/**
|
31 |
-
* Create a collection with the given range.
|
32 |
-
*
|
33 |
-
* @param int $from
|
34 |
-
* @param int $to
|
35 |
-
* @return static
|
36 |
-
*/
|
37 |
-
public static function range($from, $to)
|
38 |
-
{
|
39 |
-
return new static(\range($from, $to));
|
40 |
-
}
|
41 |
-
/**
|
42 |
-
* Get all of the items in the collection.
|
43 |
-
*
|
44 |
-
* @return array
|
45 |
-
*/
|
46 |
-
public function all()
|
47 |
-
{
|
48 |
-
return $this->items;
|
49 |
-
}
|
50 |
-
/**
|
51 |
-
* Get a lazy collection for the items in this collection.
|
52 |
-
*
|
53 |
-
* @return \Illuminate\Support\LazyCollection
|
54 |
-
*/
|
55 |
-
public function lazy()
|
56 |
-
{
|
57 |
-
return new LazyCollection($this->items);
|
58 |
-
}
|
59 |
-
/**
|
60 |
-
* Get the average value of a given key.
|
61 |
-
*
|
62 |
-
* @param callable|string|null $callback
|
63 |
-
* @return mixed
|
64 |
-
*/
|
65 |
-
public function avg($callback = null)
|
66 |
-
{
|
67 |
-
$callback = $this->valueRetriever($callback);
|
68 |
-
$items = $this->map(function ($value) use($callback) {
|
69 |
-
return $callback($value);
|
70 |
-
})->filter(function ($value) {
|
71 |
-
return !\is_null($value);
|
72 |
-
});
|
73 |
-
if ($count = $items->count()) {
|
74 |
-
return $items->sum() / $count;
|
75 |
-
}
|
76 |
-
}
|
77 |
-
/**
|
78 |
-
* Get the median of a given key.
|
79 |
-
*
|
80 |
-
* @param string|array|null $key
|
81 |
-
* @return mixed
|
82 |
-
*/
|
83 |
-
public function median($key = null)
|
84 |
-
{
|
85 |
-
$values = (isset($key) ? $this->pluck($key) : $this)->filter(function ($item) {
|
86 |
-
return !\is_null($item);
|
87 |
-
})->sort()->values();
|
88 |
-
$count = $values->count();
|
89 |
-
if ($count === 0) {
|
90 |
-
return;
|
91 |
-
}
|
92 |
-
$middle = (int) ($count / 2);
|
93 |
-
if ($count % 2) {
|
94 |
-
return $values->get($middle);
|
95 |
-
}
|
96 |
-
return (new static([$values->get($middle - 1), $values->get($middle)]))->average();
|
97 |
-
}
|
98 |
-
/**
|
99 |
-
* Get the mode of a given key.
|
100 |
-
*
|
101 |
-
* @param string|array|null $key
|
102 |
-
* @return array|null
|
103 |
-
*/
|
104 |
-
public function mode($key = null)
|
105 |
-
{
|
106 |
-
if ($this->count() === 0) {
|
107 |
-
return;
|
108 |
-
}
|
109 |
-
$collection = isset($key) ? $this->pluck($key) : $this;
|
110 |
-
$counts = new static();
|
111 |
-
$collection->each(function ($value) use($counts) {
|
112 |
-
$counts[$value] = isset($counts[$value]) ? $counts[$value] + 1 : 1;
|
113 |
-
});
|
114 |
-
$sorted = $counts->sort();
|
115 |
-
$highestValue = $sorted->last();
|
116 |
-
return $sorted->filter(function ($value) use($highestValue) {
|
117 |
-
return $value == $highestValue;
|
118 |
-
})->sort()->keys()->all();
|
119 |
-
}
|
120 |
-
/**
|
121 |
-
* Collapse the collection of items into a single array.
|
122 |
-
*
|
123 |
-
* @return static
|
124 |
-
*/
|
125 |
-
public function collapse()
|
126 |
-
{
|
127 |
-
return new static(Arr::collapse($this->items));
|
128 |
-
}
|
129 |
-
/**
|
130 |
-
* Determine if an item exists in the collection.
|
131 |
-
*
|
132 |
-
* @param mixed $key
|
133 |
-
* @param mixed $operator
|
134 |
-
* @param mixed $value
|
135 |
-
* @return bool
|
136 |
-
*/
|
137 |
-
public function contains($key, $operator = null, $value = null)
|
138 |
-
{
|
139 |
-
if (\func_num_args() === 1) {
|
140 |
-
if ($this->useAsCallable($key)) {
|
141 |
-
$placeholder = new stdClass();
|
142 |
-
return $this->first($key, $placeholder) !== $placeholder;
|
143 |
-
}
|
144 |
-
return \in_array($key, $this->items);
|
145 |
-
}
|
146 |
-
return $this->contains($this->operatorForWhere(...\func_get_args()));
|
147 |
-
}
|
148 |
-
/**
|
149 |
-
* Cross join with the given lists, returning all possible permutations.
|
150 |
-
*
|
151 |
-
* @param mixed ...$lists
|
152 |
-
* @return static
|
153 |
-
*/
|
154 |
-
public function crossJoin(...$lists)
|
155 |
-
{
|
156 |
-
return new static(Arr::crossJoin($this->items, ...\array_map([$this, 'getArrayableItems'], $lists)));
|
157 |
-
}
|
158 |
-
/**
|
159 |
-
* Get the items in the collection that are not present in the given items.
|
160 |
-
*
|
161 |
-
* @param mixed $items
|
162 |
-
* @return static
|
163 |
-
*/
|
164 |
-
public function diff($items)
|
165 |
-
{
|
166 |
-
return new static(\array_diff($this->items, $this->getArrayableItems($items)));
|
167 |
-
}
|
168 |
-
/**
|
169 |
-
* Get the items in the collection that are not present in the given items, using the callback.
|
170 |
-
*
|
171 |
-
* @param mixed $items
|
172 |
-
* @param callable $callback
|
173 |
-
* @return static
|
174 |
-
*/
|
175 |
-
public function diffUsing($items, callable $callback)
|
176 |
-
{
|
177 |
-
return new static(\array_udiff($this->items, $this->getArrayableItems($items), $callback));
|
178 |
-
}
|
179 |
-
/**
|
180 |
-
* Get the items in the collection whose keys and values are not present in the given items.
|
181 |
-
*
|
182 |
-
* @param mixed $items
|
183 |
-
* @return static
|
184 |
-
*/
|
185 |
-
public function diffAssoc($items)
|
186 |
-
{
|
187 |
-
return new static(\array_diff_assoc($this->items, $this->getArrayableItems($items)));
|
188 |
-
}
|
189 |
-
/**
|
190 |
-
* Get the items in the collection whose keys and values are not present in the given items, using the callback.
|
191 |
-
*
|
192 |
-
* @param mixed $items
|
193 |
-
* @param callable $callback
|
194 |
-
* @return static
|
195 |
-
*/
|
196 |
-
public function diffAssocUsing($items, callable $callback)
|
197 |
-
{
|
198 |
-
return new static(\array_diff_uassoc($this->items, $this->getArrayableItems($items), $callback));
|
199 |
-
}
|
200 |
-
/**
|
201 |
-
* Get the items in the collection whose keys are not present in the given items.
|
202 |
-
*
|
203 |
-
* @param mixed $items
|
204 |
-
* @return static
|
205 |
-
*/
|
206 |
-
public function diffKeys($items)
|
207 |
-
{
|
208 |
-
return new static(\array_diff_key($this->items, $this->getArrayableItems($items)));
|
209 |
-
}
|
210 |
-
/**
|
211 |
-
* Get the items in the collection whose keys are not present in the given items, using the callback.
|
212 |
-
*
|
213 |
-
* @param mixed $items
|
214 |
-
* @param callable $callback
|
215 |
-
* @return static
|
216 |
-
*/
|
217 |
-
public function diffKeysUsing($items, callable $callback)
|
218 |
-
{
|
219 |
-
return new static(\array_diff_ukey($this->items, $this->getArrayableItems($items), $callback));
|
220 |
-
}
|
221 |
-
/**
|
222 |
-
* Retrieve duplicate items from the collection.
|
223 |
-
*
|
224 |
-
* @param callable|string|null $callback
|
225 |
-
* @param bool $strict
|
226 |
-
* @return static
|
227 |
-
*/
|
228 |
-
public function duplicates($callback = null, $strict = \false)
|
229 |
-
{
|
230 |
-
$items = $this->map($this->valueRetriever($callback));
|
231 |
-
$uniqueItems = $items->unique(null, $strict);
|
232 |
-
$compare = $this->duplicateComparator($strict);
|
233 |
-
$duplicates = new static();
|
234 |
-
foreach ($items as $key => $value) {
|
235 |
-
if ($uniqueItems->isNotEmpty() && $compare($value, $uniqueItems->first())) {
|
236 |
-
$uniqueItems->shift();
|
237 |
-
} else {
|
238 |
-
$duplicates[$key] = $value;
|
239 |
-
}
|
240 |
-
}
|
241 |
-
return $duplicates;
|
242 |
-
}
|
243 |
-
/**
|
244 |
-
* Retrieve duplicate items from the collection using strict comparison.
|
245 |
-
*
|
246 |
-
* @param callable|string|null $callback
|
247 |
-
* @return static
|
248 |
-
*/
|
249 |
-
public function duplicatesStrict($callback = null)
|
250 |
-
{
|
251 |
-
return $this->duplicates($callback, \true);
|
252 |
-
}
|
253 |
-
/**
|
254 |
-
* Get the comparison function to detect duplicates.
|
255 |
-
*
|
256 |
-
* @param bool $strict
|
257 |
-
* @return \Closure
|
258 |
-
*/
|
259 |
-
protected function duplicateComparator($strict)
|
260 |
-
{
|
261 |
-
if ($strict) {
|
262 |
-
return function ($a, $b) {
|
263 |
-
return $a === $b;
|
264 |
-
};
|
265 |
-
}
|
266 |
-
return function ($a, $b) {
|
267 |
-
return $a == $b;
|
268 |
-
};
|
269 |
-
}
|
270 |
-
/**
|
271 |
-
* Get all items except for those with the specified keys.
|
272 |
-
*
|
273 |
-
* @param \Illuminate\Support\Collection|mixed $keys
|
274 |
-
* @return static
|
275 |
-
*/
|
276 |
-
public function except($keys)
|
277 |
-
{
|
278 |
-
if ($keys instanceof Enumerable) {
|
279 |
-
$keys = $keys->all();
|
280 |
-
} elseif (!\is_array($keys)) {
|
281 |
-
$keys = \func_get_args();
|
282 |
-
}
|
283 |
-
return new static(Arr::except($this->items, $keys));
|
284 |
-
}
|
285 |
-
/**
|
286 |
-
* Run a filter over each of the items.
|
287 |
-
*
|
288 |
-
* @param callable|null $callback
|
289 |
-
* @return static
|
290 |
-
*/
|
291 |
-
public function filter(callable $callback = null)
|
292 |
-
{
|
293 |
-
if ($callback) {
|
294 |
-
return new static(Arr::where($this->items, $callback));
|
295 |
-
}
|
296 |
-
return new static(\array_filter($this->items));
|
297 |
-
}
|
298 |
-
/**
|
299 |
-
* Get the first item from the collection passing the given truth test.
|
300 |
-
*
|
301 |
-
* @param callable|null $callback
|
302 |
-
* @param mixed $default
|
303 |
-
* @return mixed
|
304 |
-
*/
|
305 |
-
public function first(callable $callback = null, $default = null)
|
306 |
-
{
|
307 |
-
return Arr::first($this->items, $callback, $default);
|
308 |
-
}
|
309 |
-
/**
|
310 |
-
* Get a flattened array of the items in the collection.
|
311 |
-
*
|
312 |
-
* @param int $depth
|
313 |
-
* @return static
|
314 |
-
*/
|
315 |
-
public function flatten($depth = \INF)
|
316 |
-
{
|
317 |
-
return new static(Arr::flatten($this->items, $depth));
|
318 |
-
}
|
319 |
-
/**
|
320 |
-
* Flip the items in the collection.
|
321 |
-
*
|
322 |
-
* @return static
|
323 |
-
*/
|
324 |
-
public function flip()
|
325 |
-
{
|
326 |
-
return new static(\array_flip($this->items));
|
327 |
-
}
|
328 |
-
/**
|
329 |
-
* Remove an item from the collection by key.
|
330 |
-
*
|
331 |
-
* @param string|array $keys
|
332 |
-
* @return $this
|
333 |
-
*/
|
334 |
-
public function forget($keys)
|
335 |
-
{
|
336 |
-
foreach ((array) $keys as $key) {
|
337 |
-
$this->offsetUnset($key);
|
338 |
-
}
|
339 |
-
return $this;
|
340 |
-
}
|
341 |
-
/**
|
342 |
-
* Get an item from the collection by key.
|
343 |
-
*
|
344 |
-
* @param mixed $key
|
345 |
-
* @param mixed $default
|
346 |
-
* @return mixed
|
347 |
-
*/
|
348 |
-
public function get($key, $default = null)
|
349 |
-
{
|
350 |
-
if (\array_key_exists($key, $this->items)) {
|
351 |
-
return $this->items[$key];
|
352 |
-
}
|
353 |
-
return value($default);
|
354 |
-
}
|
355 |
-
/**
|
356 |
-
* Group an associative array by a field or using a callback.
|
357 |
-
*
|
358 |
-
* @param array|callable|string $groupBy
|
359 |
-
* @param bool $preserveKeys
|
360 |
-
* @return static
|
361 |
-
*/
|
362 |
-
public function groupBy($groupBy, $preserveKeys = \false)
|
363 |
-
{
|
364 |
-
if (!$this->useAsCallable($groupBy) && \is_array($groupBy)) {
|
365 |
-
$nextGroups = $groupBy;
|
366 |
-
$groupBy = \array_shift($nextGroups);
|
367 |
-
}
|
368 |
-
$groupBy = $this->valueRetriever($groupBy);
|
369 |
-
$results = [];
|
370 |
-
foreach ($this->items as $key => $value) {
|
371 |
-
$groupKeys = $groupBy($value, $key);
|
372 |
-
if (!\is_array($groupKeys)) {
|
373 |
-
$groupKeys = [$groupKeys];
|
374 |
-
}
|
375 |
-
foreach ($groupKeys as $groupKey) {
|
376 |
-
$groupKey = \is_bool($groupKey) ? (int) $groupKey : $groupKey;
|
377 |
-
if (!\array_key_exists($groupKey, $results)) {
|
378 |
-
$results[$groupKey] = new static();
|
379 |
-
}
|
380 |
-
$results[$groupKey]->offsetSet($preserveKeys ? $key : null, $value);
|
381 |
-
}
|
382 |
-
}
|
383 |
-
$result = new static($results);
|
384 |
-
if (!empty($nextGroups)) {
|
385 |
-
return $result->map->groupBy($nextGroups, $preserveKeys);
|
386 |
-
}
|
387 |
-
return $result;
|
388 |
-
}
|
389 |
-
/**
|
390 |
-
* Key an associative array by a field or using a callback.
|
391 |
-
*
|
392 |
-
* @param callable|string $keyBy
|
393 |
-
* @return static
|
394 |
-
*/
|
395 |
-
public function keyBy($keyBy)
|
396 |
-
{
|
397 |
-
$keyBy = $this->valueRetriever($keyBy);
|
398 |
-
$results = [];
|
399 |
-
foreach ($this->items as $key => $item) {
|
400 |
-
$resolvedKey = $keyBy($item, $key);
|
401 |
-
if (\is_object($resolvedKey)) {
|
402 |
-
$resolvedKey = (string) $resolvedKey;
|
403 |
-
}
|
404 |
-
$results[$resolvedKey] = $item;
|
405 |
-
}
|
406 |
-
return new static($results);
|
407 |
-
}
|
408 |
-
/**
|
409 |
-
* Determine if an item exists in the collection by key.
|
410 |
-
*
|
411 |
-
* @param mixed $key
|
412 |
-
* @return bool
|
413 |
-
*/
|
414 |
-
public function has($key)
|
415 |
-
{
|
416 |
-
$keys = \is_array($key) ? $key : \func_get_args();
|
417 |
-
foreach ($keys as $value) {
|
418 |
-
if (!\array_key_exists($value, $this->items)) {
|
419 |
-
return \false;
|
420 |
-
}
|
421 |
-
}
|
422 |
-
return \true;
|
423 |
-
}
|
424 |
-
/**
|
425 |
-
* Determine if any of the keys exist in the collection.
|
426 |
-
*
|
427 |
-
* @param mixed $key
|
428 |
-
* @return bool
|
429 |
-
*/
|
430 |
-
public function hasAny($key)
|
431 |
-
{
|
432 |
-
if ($this->isEmpty()) {
|
433 |
-
return \false;
|
434 |
-
}
|
435 |
-
$keys = \is_array($key) ? $key : \func_get_args();
|
436 |
-
foreach ($keys as $value) {
|
437 |
-
if ($this->has($value)) {
|
438 |
-
return \true;
|
439 |
-
}
|
440 |
-
}
|
441 |
-
return \false;
|
442 |
-
}
|
443 |
-
/**
|
444 |
-
* Concatenate values of a given key as a string.
|
445 |
-
*
|
446 |
-
* @param string $value
|
447 |
-
* @param string|null $glue
|
448 |
-
* @return string
|
449 |
-
*/
|
450 |
-
public function implode($value, $glue = null)
|
451 |
-
{
|
452 |
-
$first = $this->first();
|
453 |
-
if (\is_array($first) || \is_object($first) && !$first instanceof Stringable) {
|
454 |
-
return \implode($glue ?? '', $this->pluck($value)->all());
|
455 |
-
}
|
456 |
-
return \implode($value ?? '', $this->items);
|
457 |
-
}
|
458 |
-
/**
|
459 |
-
* Intersect the collection with the given items.
|
460 |
-
*
|
461 |
-
* @param mixed $items
|
462 |
-
* @return static
|
463 |
-
*/
|
464 |
-
public function intersect($items)
|
465 |
-
{
|
466 |
-
return new static(\array_intersect($this->items, $this->getArrayableItems($items)));
|
467 |
-
}
|
468 |
-
/**
|
469 |
-
* Intersect the collection with the given items by key.
|
470 |
-
*
|
471 |
-
* @param mixed $items
|
472 |
-
* @return static
|
473 |
-
*/
|
474 |
-
public function intersectByKeys($items)
|
475 |
-
{
|
476 |
-
return new static(\array_intersect_key($this->items, $this->getArrayableItems($items)));
|
477 |
-
}
|
478 |
-
/**
|
479 |
-
* Determine if the collection is empty or not.
|
480 |
-
*
|
481 |
-
* @return bool
|
482 |
-
*/
|
483 |
-
public function isEmpty()
|
484 |
-
{
|
485 |
-
return empty($this->items);
|
486 |
-
}
|
487 |
-
/**
|
488 |
-
* Determine if the collection contains a single item.
|
489 |
-
*
|
490 |
-
* @return bool
|
491 |
-
*/
|
492 |
-
public function containsOneItem()
|
493 |
-
{
|
494 |
-
return $this->count() === 1;
|
495 |
-
}
|
496 |
-
/**
|
497 |
-
* Join all items from the collection using a string. The final items can use a separate glue string.
|
498 |
-
*
|
499 |
-
* @param string $glue
|
500 |
-
* @param string $finalGlue
|
501 |
-
* @return string
|
502 |
-
*/
|
503 |
-
public function join($glue, $finalGlue = '')
|
504 |
-
{
|
505 |
-
if ($finalGlue === '') {
|
506 |
-
return $this->implode($glue);
|
507 |
-
}
|
508 |
-
$count = $this->count();
|
509 |
-
if ($count === 0) {
|
510 |
-
return '';
|
511 |
-
}
|
512 |
-
if ($count === 1) {
|
513 |
-
return $this->last();
|
514 |
-
}
|
515 |
-
$collection = new static($this->items);
|
516 |
-
$finalItem = $collection->pop();
|
517 |
-
return $collection->implode($glue) . $finalGlue . $finalItem;
|
518 |
-
}
|
519 |
-
/**
|
520 |
-
* Get the keys of the collection items.
|
521 |
-
*
|
522 |
-
* @return static
|
523 |
-
*/
|
524 |
-
public function keys()
|
525 |
-
{
|
526 |
-
return new static(\array_keys($this->items));
|
527 |
-
}
|
528 |
-
/**
|
529 |
-
* Get the last item from the collection.
|
530 |
-
*
|
531 |
-
* @param callable|null $callback
|
532 |
-
* @param mixed $default
|
533 |
-
* @return mixed
|
534 |
-
*/
|
535 |
-
public function last(callable $callback = null, $default = null)
|
536 |
-
{
|
537 |
-
return Arr::last($this->items, $callback, $default);
|
538 |
-
}
|
539 |
-
/**
|
540 |
-
* Get the values of a given key.
|
541 |
-
*
|
542 |
-
* @param string|array|int|null $value
|
543 |
-
* @param string|null $key
|
544 |
-
* @return static
|
545 |
-
*/
|
546 |
-
public function pluck($value, $key = null)
|
547 |
-
{
|
548 |
-
return new static(Arr::pluck($this->items, $value, $key));
|
549 |
-
}
|
550 |
-
/**
|
551 |
-
* Run a map over each of the items.
|
552 |
-
*
|
553 |
-
* @param callable $callback
|
554 |
-
* @return static
|
555 |
-
*/
|
556 |
-
public function map(callable $callback)
|
557 |
-
{
|
558 |
-
$keys = \array_keys($this->items);
|
559 |
-
$items = \array_map($callback, $this->items, $keys);
|
560 |
-
return new static(\array_combine($keys, $items));
|
561 |
-
}
|
562 |
-
/**
|
563 |
-
* Run a dictionary map over the items.
|
564 |
-
*
|
565 |
-
* The callback should return an associative array with a single key/value pair.
|
566 |
-
*
|
567 |
-
* @param callable $callback
|
568 |
-
* @return static
|
569 |
-
*/
|
570 |
-
public function mapToDictionary(callable $callback)
|
571 |
-
{
|
572 |
-
$dictionary = [];
|
573 |
-
foreach ($this->items as $key => $item) {
|
574 |
-
$pair = $callback($item, $key);
|
575 |
-
$key = \key($pair);
|
576 |
-
$value = \reset($pair);
|
577 |
-
if (!isset($dictionary[$key])) {
|
578 |
-
$dictionary[$key] = [];
|
579 |
-
}
|
580 |
-
$dictionary[$key][] = $value;
|
581 |
-
}
|
582 |
-
return new static($dictionary);
|
583 |
-
}
|
584 |
-
/**
|
585 |
-
* Run an associative map over each of the items.
|
586 |
-
*
|
587 |
-
* The callback should return an associative array with a single key/value pair.
|
588 |
-
*
|
589 |
-
* @param callable $callback
|
590 |
-
* @return static
|
591 |
-
*/
|
592 |
-
public function mapWithKeys(callable $callback)
|
593 |
-
{
|
594 |
-
$result = [];
|
595 |
-
foreach ($this->items as $key => $value) {
|
596 |
-
$assoc = $callback($value, $key);
|
597 |
-
foreach ($assoc as $mapKey => $mapValue) {
|
598 |
-
$result[$mapKey] = $mapValue;
|
599 |
-
}
|
600 |
-
}
|
601 |
-
return new static($result);
|
602 |
-
}
|
603 |
-
/**
|
604 |
-
* Merge the collection with the given items.
|
605 |
-
*
|
606 |
-
* @param mixed $items
|
607 |
-
* @return static
|
608 |
-
*/
|
609 |
-
public function merge($items)
|
610 |
-
{
|
611 |
-
return new static(\array_merge($this->items, $this->getArrayableItems($items)));
|
612 |
-
}
|
613 |
-
/**
|
614 |
-
* Recursively merge the collection with the given items.
|
615 |
-
*
|
616 |
-
* @param mixed $items
|
617 |
-
* @return static
|
618 |
-
*/
|
619 |
-
public function mergeRecursive($items)
|
620 |
-
{
|
621 |
-
return new static(\array_merge_recursive($this->items, $this->getArrayableItems($items)));
|
622 |
-
}
|
623 |
-
/**
|
624 |
-
* Create a collection by using this collection for keys and another for its values.
|
625 |
-
*
|
626 |
-
* @param mixed $values
|
627 |
-
* @return static
|
628 |
-
*/
|
629 |
-
public function combine($values)
|
630 |
-
{
|
631 |
-
return new static(\array_combine($this->all(), $this->getArrayableItems($values)));
|
632 |
-
}
|
633 |
-
/**
|
634 |
-
* Union the collection with the given items.
|
635 |
-
*
|
636 |
-
* @param mixed $items
|
637 |
-
* @return static
|
638 |
-
*/
|
639 |
-
public function union($items)
|
640 |
-
{
|
641 |
-
return new static($this->items + $this->getArrayableItems($items));
|
642 |
-
}
|
643 |
-
/**
|
644 |
-
* Create a new collection consisting of every n-th element.
|
645 |
-
*
|
646 |
-
* @param int $step
|
647 |
-
* @param int $offset
|
648 |
-
* @return static
|
649 |
-
*/
|
650 |
-
public function nth($step, $offset = 0)
|
651 |
-
{
|
652 |
-
$new = [];
|
653 |
-
$position = 0;
|
654 |
-
foreach ($this->items as $item) {
|
655 |
-
if ($position % $step === $offset) {
|
656 |
-
$new[] = $item;
|
657 |
-
}
|
658 |
-
$position++;
|
659 |
-
}
|
660 |
-
return new static($new);
|
661 |
-
}
|
662 |
-
/**
|
663 |
-
* Get the items with the specified keys.
|
664 |
-
*
|
665 |
-
* @param mixed $keys
|
666 |
-
* @return static
|
667 |
-
*/
|
668 |
-
public function only($keys)
|
669 |
-
{
|
670 |
-
if (\is_null($keys)) {
|
671 |
-
return new static($this->items);
|
672 |
-
}
|
673 |
-
if ($keys instanceof Enumerable) {
|
674 |
-
$keys = $keys->all();
|
675 |
-
}
|
676 |
-
$keys = \is_array($keys) ? $keys : \func_get_args();
|
677 |
-
return new static(Arr::only($this->items, $keys));
|
678 |
-
}
|
679 |
-
/**
|
680 |
-
* Get and remove the last N items from the collection.
|
681 |
-
*
|
682 |
-
* @param int $count
|
683 |
-
* @return mixed
|
684 |
-
*/
|
685 |
-
public function pop($count = 1)
|
686 |
-
{
|
687 |
-
if ($count === 1) {
|
688 |
-
return \array_pop($this->items);
|
689 |
-
}
|
690 |
-
if ($this->isEmpty()) {
|
691 |
-
return new static();
|
692 |
-
}
|
693 |
-
$results = [];
|
694 |
-
$collectionCount = $this->count();
|
695 |
-
foreach (\range(1, \min($count, $collectionCount)) as $item) {
|
696 |
-
\array_push($results, \array_pop($this->items));
|
697 |
-
}
|
698 |
-
return new static($results);
|
699 |
-
}
|
700 |
-
/**
|
701 |
-
* Push an item onto the beginning of the collection.
|
702 |
-
*
|
703 |
-
* @param mixed $value
|
704 |
-
* @param mixed $key
|
705 |
-
* @return $this
|
706 |
-
*/
|
707 |
-
public function prepend($value, $key = null)
|
708 |
-
{
|
709 |
-
$this->items = Arr::prepend($this->items, ...\func_get_args());
|
710 |
-
return $this;
|
711 |
-
}
|
712 |
-
/**
|
713 |
-
* Push one or more items onto the end of the collection.
|
714 |
-
*
|
715 |
-
* @param mixed $values
|
716 |
-
* @return $this
|
717 |
-
*/
|
718 |
-
public function push(...$values)
|
719 |
-
{
|
720 |
-
foreach ($values as $value) {
|
721 |
-
$this->items[] = $value;
|
722 |
-
}
|
723 |
-
return $this;
|
724 |
-
}
|
725 |
-
/**
|
726 |
-
* Push all of the given items onto the collection.
|
727 |
-
*
|
728 |
-
* @param iterable $source
|
729 |
-
* @return static
|
730 |
-
*/
|
731 |
-
public function concat($source)
|
732 |
-
{
|
733 |
-
$result = new static($this);
|
734 |
-
foreach ($source as $item) {
|
735 |
-
$result->push($item);
|
736 |
-
}
|
737 |
-
return $result;
|
738 |
-
}
|
739 |
-
/**
|
740 |
-
* Get and remove an item from the collection.
|
741 |
-
*
|
742 |
-
* @param mixed $key
|
743 |
-
* @param mixed $default
|
744 |
-
* @return mixed
|
745 |
-
*/
|
746 |
-
public function pull($key, $default = null)
|
747 |
-
{
|
748 |
-
return Arr::pull($this->items, $key, $default);
|
749 |
-
}
|
750 |
-
/**
|
751 |
-
* Put an item in the collection by key.
|
752 |
-
*
|
753 |
-
* @param mixed $key
|
754 |
-
* @param mixed $value
|
755 |
-
* @return $this
|
756 |
-
*/
|
757 |
-
public function put($key, $value)
|
758 |
-
{
|
759 |
-
$this->offsetSet($key, $value);
|
760 |
-
return $this;
|
761 |
-
}
|
762 |
-
/**
|
763 |
-
* Get one or a specified number of items randomly from the collection.
|
764 |
-
*
|
765 |
-
* @param int|null $number
|
766 |
-
* @return static|mixed
|
767 |
-
*
|
768 |
-
* @throws \InvalidArgumentException
|
769 |
-
*/
|
770 |
-
public function random($number = null)
|
771 |
-
{
|
772 |
-
if (\is_null($number)) {
|
773 |
-
return Arr::random($this->items);
|
774 |
-
}
|
775 |
-
return new static(Arr::random($this->items, $number));
|
776 |
-
}
|
777 |
-
/**
|
778 |
-
* Replace the collection items with the given items.
|
779 |
-
*
|
780 |
-
* @param mixed $items
|
781 |
-
* @return static
|
782 |
-
*/
|
783 |
-
public function replace($items)
|
784 |
-
{
|
785 |
-
return new static(\array_replace($this->items, $this->getArrayableItems($items)));
|
786 |
-
}
|
787 |
-
/**
|
788 |
-
* Recursively replace the collection items with the given items.
|
789 |
-
*
|
790 |
-
* @param mixed $items
|
791 |
-
* @return static
|
792 |
-
*/
|
793 |
-
public function replaceRecursive($items)
|
794 |
-
{
|
795 |
-
return new static(\array_replace_recursive($this->items, $this->getArrayableItems($items)));
|
796 |
-
}
|
797 |
-
/**
|
798 |
-
* Reverse items order.
|
799 |
-
*
|
800 |
-
* @return static
|
801 |
-
*/
|
802 |
-
public function reverse()
|
803 |
-
{
|
804 |
-
return new static(\array_reverse($this->items, \true));
|
805 |
-
}
|
806 |
-
/**
|
807 |
-
* Search the collection for a given value and return the corresponding key if successful.
|
808 |
-
*
|
809 |
-
* @param mixed $value
|
810 |
-
* @param bool $strict
|
811 |
-
* @return mixed
|
812 |
-
*/
|
813 |
-
public function search($value, $strict = \false)
|
814 |
-
{
|
815 |
-
if (!$this->useAsCallable($value)) {
|
816 |
-
return \array_search($value, $this->items, $strict);
|
817 |
-
}
|
818 |
-
foreach ($this->items as $key => $item) {
|
819 |
-
if ($value($item, $key)) {
|
820 |
-
return $key;
|
821 |
-
}
|
822 |
-
}
|
823 |
-
return \false;
|
824 |
-
}
|
825 |
-
/**
|
826 |
-
* Get and remove the first N items from the collection.
|
827 |
-
*
|
828 |
-
* @param int $count
|
829 |
-
* @return mixed
|
830 |
-
*/
|
831 |
-
public function shift($count = 1)
|
832 |
-
{
|
833 |
-
if ($count === 1) {
|
834 |
-
return \array_shift($this->items);
|
835 |
-
}
|
836 |
-
if ($this->isEmpty()) {
|
837 |
-
return new static();
|
838 |
-
}
|
839 |
-
$results = [];
|
840 |
-
$collectionCount = $this->count();
|
841 |
-
foreach (\range(1, \min($count, $collectionCount)) as $item) {
|
842 |
-
\array_push($results, \array_shift($this->items));
|
843 |
-
}
|
844 |
-
return new static($results);
|
845 |
-
}
|
846 |
-
/**
|
847 |
-
* Shuffle the items in the collection.
|
848 |
-
*
|
849 |
-
* @param int|null $seed
|
850 |
-
* @return static
|
851 |
-
*/
|
852 |
-
public function shuffle($seed = null)
|
853 |
-
{
|
854 |
-
return new static(Arr::shuffle($this->items, $seed));
|
855 |
-
}
|
856 |
-
/**
|
857 |
-
* Create chunks representing a "sliding window" view of the items in the collection.
|
858 |
-
*
|
859 |
-
* @param int $size
|
860 |
-
* @param int $step
|
861 |
-
* @return static
|
862 |
-
*/
|
863 |
-
public function sliding($size = 2, $step = 1)
|
864 |
-
{
|
865 |
-
$chunks = \floor(($this->count() - $size) / $step) + 1;
|
866 |
-
return static::times($chunks, function ($number) use($size, $step) {
|
867 |
-
return $this->slice(($number - 1) * $step, $size);
|
868 |
-
});
|
869 |
-
}
|
870 |
-
/**
|
871 |
-
* Skip the first {$count} items.
|
872 |
-
*
|
873 |
-
* @param int $count
|
874 |
-
* @return static
|
875 |
-
*/
|
876 |
-
public function skip($count)
|
877 |
-
{
|
878 |
-
return $this->slice($count);
|
879 |
-
}
|
880 |
-
/**
|
881 |
-
* Skip items in the collection until the given condition is met.
|
882 |
-
*
|
883 |
-
* @param mixed $value
|
884 |
-
* @return static
|
885 |
-
*/
|
886 |
-
public function skipUntil($value)
|
887 |
-
{
|
888 |
-
return new static($this->lazy()->skipUntil($value)->all());
|
889 |
-
}
|
890 |
-
/**
|
891 |
-
* Skip items in the collection while the given condition is met.
|
892 |
-
*
|
893 |
-
* @param mixed $value
|
894 |
-
* @return static
|
895 |
-
*/
|
896 |
-
public function skipWhile($value)
|
897 |
-
{
|
898 |
-
return new static($this->lazy()->skipWhile($value)->all());
|
899 |
-
}
|
900 |
-
/**
|
901 |
-
* Slice the underlying collection array.
|
902 |
-
*
|
903 |
-
* @param int $offset
|
904 |
-
* @param int|null $length
|
905 |
-
* @return static
|
906 |
-
*/
|
907 |
-
public function slice($offset, $length = null)
|
908 |
-
{
|
909 |
-
return new static(\array_slice($this->items, $offset, $length, \true));
|
910 |
-
}
|
911 |
-
/**
|
912 |
-
* Split a collection into a certain number of groups.
|
913 |
-
*
|
914 |
-
* @param int $numberOfGroups
|
915 |
-
* @return static
|
916 |
-
*/
|
917 |
-
public function split($numberOfGroups)
|
918 |
-
{
|
919 |
-
if ($this->isEmpty()) {
|
920 |
-
return new static();
|
921 |
-
}
|
922 |
-
$groups = new static();
|
923 |
-
$groupSize = \floor($this->count() / $numberOfGroups);
|
924 |
-
$remain = $this->count() % $numberOfGroups;
|
925 |
-
$start = 0;
|
926 |
-
for ($i = 0; $i < $numberOfGroups; $i++) {
|
927 |
-
$size = $groupSize;
|
928 |
-
if ($i < $remain) {
|
929 |
-
$size++;
|
930 |
-
}
|
931 |
-
if ($size) {
|
932 |
-
$groups->push(new static(\array_slice($this->items, $start, $size)));
|
933 |
-
$start += $size;
|
934 |
-
}
|
935 |
-
}
|
936 |
-
return $groups;
|
937 |
-
}
|
938 |
-
/**
|
939 |
-
* Split a collection into a certain number of groups, and fill the first groups completely.
|
940 |
-
*
|
941 |
-
* @param int $numberOfGroups
|
942 |
-
* @return static
|
943 |
-
*/
|
944 |
-
public function splitIn($numberOfGroups)
|
945 |
-
{
|
946 |
-
return $this->chunk(\ceil($this->count() / $numberOfGroups));
|
947 |
-
}
|
948 |
-
/**
|
949 |
-
* Get the first item in the collection, but only if exactly one item exists. Otherwise, throw an exception.
|
950 |
-
*
|
951 |
-
* @param mixed $key
|
952 |
-
* @param mixed $operator
|
953 |
-
* @param mixed $value
|
954 |
-
* @return mixed
|
955 |
-
*
|
956 |
-
* @throws \Illuminate\Support\ItemNotFoundException
|
957 |
-
* @throws \Illuminate\Support\MultipleItemsFoundException
|
958 |
-
*/
|
959 |
-
public function sole($key = null, $operator = null, $value = null)
|
960 |
-
{
|
961 |
-
$filter = \func_num_args() > 1 ? $this->operatorForWhere(...\func_get_args()) : $key;
|
962 |
-
$items = $this->when($filter)->filter($filter);
|
963 |
-
if ($items->isEmpty()) {
|
964 |
-
throw new ItemNotFoundException();
|
965 |
-
}
|
966 |
-
if ($items->count() > 1) {
|
967 |
-
throw new MultipleItemsFoundException();
|
968 |
-
}
|
969 |
-
return $items->first();
|
970 |
-
}
|
971 |
-
/**
|
972 |
-
* Get the first item in the collection but throw an exception if no matching items exist.
|
973 |
-
*
|
974 |
-
* @param mixed $key
|
975 |
-
* @param mixed $operator
|
976 |
-
* @param mixed $value
|
977 |
-
* @return mixed
|
978 |
-
*
|
979 |
-
* @throws \Illuminate\Support\ItemNotFoundException
|
980 |
-
*/
|
981 |
-
public function firstOrFail($key = null, $operator = null, $value = null)
|
982 |
-
{
|
983 |
-
$filter = \func_num_args() > 1 ? $this->operatorForWhere(...\func_get_args()) : $key;
|
984 |
-
$placeholder = new stdClass();
|
985 |
-
$item = $this->first($filter, $placeholder);
|
986 |
-
if ($item === $placeholder) {
|
987 |
-
throw new ItemNotFoundException();
|
988 |
-
}
|
989 |
-
return $item;
|
990 |
-
}
|
991 |
-
/**
|
992 |
-
* Chunk the collection into chunks of the given size.
|
993 |
-
*
|
994 |
-
* @param int $size
|
995 |
-
* @return static
|
996 |
-
*/
|
997 |
-
public function chunk($size)
|
998 |
-
{
|
999 |
-
if ($size <= 0) {
|
1000 |
-
return new static();
|
1001 |
-
}
|
1002 |
-
$chunks = [];
|
1003 |
-
foreach (\array_chunk($this->items, $size, \true) as $chunk) {
|
1004 |
-
$chunks[] = new static($chunk);
|
1005 |
-
}
|
1006 |
-
return new static($chunks);
|
1007 |
-
}
|
1008 |
-
/**
|
1009 |
-
* Chunk the collection into chunks with a callback.
|
1010 |
-
*
|
1011 |
-
* @param callable $callback
|
1012 |
-
* @return static
|
1013 |
-
*/
|
1014 |
-
public function chunkWhile(callable $callback)
|
1015 |
-
{
|
1016 |
-
return new static($this->lazy()->chunkWhile($callback)->mapInto(static::class));
|
1017 |
-
}
|
1018 |
-
/**
|
1019 |
-
* Sort through each item with a callback.
|
1020 |
-
*
|
1021 |
-
* @param callable|int|null $callback
|
1022 |
-
* @return static
|
1023 |
-
*/
|
1024 |
-
public function sort($callback = null)
|
1025 |
-
{
|
1026 |
-
$items = $this->items;
|
1027 |
-
$callback && \is_callable($callback) ? \uasort($items, $callback) : \asort($items, $callback ?? \SORT_REGULAR);
|
1028 |
-
return new static($items);
|
1029 |
-
}
|
1030 |
-
/**
|
1031 |
-
* Sort items in descending order.
|
1032 |
-
*
|
1033 |
-
* @param int $options
|
1034 |
-
* @return static
|
1035 |
-
*/
|
1036 |
-
public function sortDesc($options = \SORT_REGULAR)
|
1037 |
-
{
|
1038 |
-
$items = $this->items;
|
1039 |
-
\arsort($items, $options);
|
1040 |
-
return new static($items);
|
1041 |
-
}
|
1042 |
-
/**
|
1043 |
-
* Sort the collection using the given callback.
|
1044 |
-
*
|
1045 |
-
* @param callable|array|string $callback
|
1046 |
-
* @param int $options
|
1047 |
-
* @param bool $descending
|
1048 |
-
* @return static
|
1049 |
-
*/
|
1050 |
-
public function sortBy($callback, $options = \SORT_REGULAR, $descending = \false)
|
1051 |
-
{
|
1052 |
-
if (\is_array($callback) && !\is_callable($callback)) {
|
1053 |
-
return $this->sortByMany($callback);
|
1054 |
-
}
|
1055 |
-
$results = [];
|
1056 |
-
$callback = $this->valueRetriever($callback);
|
1057 |
-
// First we will loop through the items and get the comparator from a callback
|
1058 |
-
// function which we were given. Then, we will sort the returned values and
|
1059 |
-
// and grab the corresponding values for the sorted keys from this array.
|
1060 |
-
foreach ($this->items as $key => $value) {
|
1061 |
-
$results[$key] = $callback($value, $key);
|
1062 |
-
}
|
1063 |
-
$descending ? \arsort($results, $options) : \asort($results, $options);
|
1064 |
-
// Once we have sorted all of the keys in the array, we will loop through them
|
1065 |
-
// and grab the corresponding model so we can set the underlying items list
|
1066 |
-
// to the sorted version. Then we'll just return the collection instance.
|
1067 |
-
foreach (\array_keys($results) as $key) {
|
1068 |
-
$results[$key] = $this->items[$key];
|
1069 |
-
}
|
1070 |
-
return new static($results);
|
1071 |
-
}
|
1072 |
-
/**
|
1073 |
-
* Sort the collection using multiple comparisons.
|
1074 |
-
*
|
1075 |
-
* @param array $comparisons
|
1076 |
-
* @return static
|
1077 |
-
*/
|
1078 |
-
protected function sortByMany(array $comparisons = [])
|
1079 |
-
{
|
1080 |
-
$items = $this->items;
|
1081 |
-
\usort($items, function ($a, $b) use($comparisons) {
|
1082 |
-
foreach ($comparisons as $comparison) {
|
1083 |
-
$comparison = Arr::wrap($comparison);
|
1084 |
-
$prop = $comparison[0];
|
1085 |
-
$ascending = Arr::get($comparison, 1, \true) === \true || Arr::get($comparison, 1, \true) === 'asc';
|
1086 |
-
$result = 0;
|
1087 |
-
if (\is_callable($prop)) {
|
1088 |
-
$result = $prop($a, $b);
|
1089 |
-
} else {
|
1090 |
-
$values = [data_get($a, $prop), data_get($b, $prop)];
|
1091 |
-
if (!$ascending) {
|
1092 |
-
$values = \array_reverse($values);
|
1093 |
-
}
|
1094 |
-
$result = $values[0] <=> $values[1];
|
1095 |
-
}
|
1096 |
-
if ($result === 0) {
|
1097 |
-
continue;
|
1098 |
-
}
|
1099 |
-
return $result;
|
1100 |
-
}
|
1101 |
-
});
|
1102 |
-
return new static($items);
|
1103 |
-
}
|
1104 |
-
/**
|
1105 |
-
* Sort the collection in descending order using the given callback.
|
1106 |
-
*
|
1107 |
-
* @param callable|string $callback
|
1108 |
-
* @param int $options
|
1109 |
-
* @return static
|
1110 |
-
*/
|
1111 |
-
public function sortByDesc($callback, $options = \SORT_REGULAR)
|
1112 |
-
{
|
1113 |
-
return $this->sortBy($callback, $options, \true);
|
1114 |
-
}
|
1115 |
-
/**
|
1116 |
-
* Sort the collection keys.
|
1117 |
-
*
|
1118 |
-
* @param int $options
|
1119 |
-
* @param bool $descending
|
1120 |
-
* @return static
|
1121 |
-
*/
|
1122 |
-
public function sortKeys($options = \SORT_REGULAR, $descending = \false)
|
1123 |
-
{
|
1124 |
-
$items = $this->items;
|
1125 |
-
$descending ? \krsort($items, $options) : \ksort($items, $options);
|
1126 |
-
return new static($items);
|
1127 |
-
}
|
1128 |
-
/**
|
1129 |
-
* Sort the collection keys in descending order.
|
1130 |
-
*
|
1131 |
-
* @param int $options
|
1132 |
-
* @return static
|
1133 |
-
*/
|
1134 |
-
public function sortKeysDesc($options = \SORT_REGULAR)
|
1135 |
-
{
|
1136 |
-
return $this->sortKeys($options, \true);
|
1137 |
-
}
|
1138 |
-
/**
|
1139 |
-
* Splice a portion of the underlying collection array.
|
1140 |
-
*
|
1141 |
-
* @param int $offset
|
1142 |
-
* @param int|null $length
|
1143 |
-
* @param mixed $replacement
|
1144 |
-
* @return static
|
1145 |
-
*/
|
1146 |
-
public function splice($offset, $length = null, $replacement = [])
|
1147 |
-
{
|
1148 |
-
if (\func_num_args() === 1) {
|
1149 |
-
return new static(\array_splice($this->items, $offset));
|
1150 |
-
}
|
1151 |
-
return new static(\array_splice($this->items, $offset, $length, $this->getArrayableItems($replacement)));
|
1152 |
-
}
|
1153 |
-
/**
|
1154 |
-
* Take the first or last {$limit} items.
|
1155 |
-
*
|
1156 |
-
* @param int $limit
|
1157 |
-
* @return static
|
1158 |
-
*/
|
1159 |
-
public function take($limit)
|
1160 |
-
{
|
1161 |
-
if ($limit < 0) {
|
1162 |
-
return $this->slice($limit, \abs($limit));
|
1163 |
-
}
|
1164 |
-
return $this->slice(0, $limit);
|
1165 |
-
}
|
1166 |
-
/**
|
1167 |
-
* Take items in the collection until the given condition is met.
|
1168 |
-
*
|
1169 |
-
* @param mixed $value
|
1170 |
-
* @return static
|
1171 |
-
*/
|
1172 |
-
public function takeUntil($value)
|
1173 |
-
{
|
1174 |
-
return new static($this->lazy()->takeUntil($value)->all());
|
1175 |
-
}
|
1176 |
-
/**
|
1177 |
-
* Take items in the collection while the given condition is met.
|
1178 |
-
*
|
1179 |
-
* @param mixed $value
|
1180 |
-
* @return static
|
1181 |
-
*/
|
1182 |
-
public function takeWhile($value)
|
1183 |
-
{
|
1184 |
-
return new static($this->lazy()->takeWhile($value)->all());
|
1185 |
-
}
|
1186 |
-
/**
|
1187 |
-
* Transform each item in the collection using a callback.
|
1188 |
-
*
|
1189 |
-
* @param callable $callback
|
1190 |
-
* @return $this
|
1191 |
-
*/
|
1192 |
-
public function transform(callable $callback)
|
1193 |
-
{
|
1194 |
-
$this->items = $this->map($callback)->all();
|
1195 |
-
return $this;
|
1196 |
-
}
|
1197 |
-
/**
|
1198 |
-
* Convert a flatten "dot" notation array into an expanded array.
|
1199 |
-
*
|
1200 |
-
* @return static
|
1201 |
-
*/
|
1202 |
-
public function undot()
|
1203 |
-
{
|
1204 |
-
return new static(Arr::undot($this->all()));
|
1205 |
-
}
|
1206 |
-
/**
|
1207 |
-
* Return only unique items from the collection array.
|
1208 |
-
*
|
1209 |
-
* @param string|callable|null $key
|
1210 |
-
* @param bool $strict
|
1211 |
-
* @return static
|
1212 |
-
*/
|
1213 |
-
public function unique($key = null, $strict = \false)
|
1214 |
-
{
|
1215 |
-
if (\is_null($key) && $strict === \false) {
|
1216 |
-
return new static(\array_unique($this->items, \SORT_REGULAR));
|
1217 |
-
}
|
1218 |
-
$callback = $this->valueRetriever($key);
|
1219 |
-
$exists = [];
|
1220 |
-
return $this->reject(function ($item, $key) use($callback, $strict, &$exists) {
|
1221 |
-
if (\in_array($id = $callback($item, $key), $exists, $strict)) {
|
1222 |
-
return \true;
|
1223 |
-
}
|
1224 |
-
$exists[] = $id;
|
1225 |
-
});
|
1226 |
-
}
|
1227 |
-
/**
|
1228 |
-
* Reset the keys on the underlying array.
|
1229 |
-
*
|
1230 |
-
* @return static
|
1231 |
-
*/
|
1232 |
-
public function values()
|
1233 |
-
{
|
1234 |
-
return new static(\array_values($this->items));
|
1235 |
-
}
|
1236 |
-
/**
|
1237 |
-
* Zip the collection together with one or more arrays.
|
1238 |
-
*
|
1239 |
-
* e.g. new Collection([1, 2, 3])->zip([4, 5, 6]);
|
1240 |
-
* => [[1, 4], [2, 5], [3, 6]]
|
1241 |
-
*
|
1242 |
-
* @param mixed ...$items
|
1243 |
-
* @return static
|
1244 |
-
*/
|
1245 |
-
public function zip($items)
|
1246 |
-
{
|
1247 |
-
$arrayableItems = \array_map(function ($items) {
|
1248 |
-
return $this->getArrayableItems($items);
|
1249 |
-
}, \func_get_args());
|
1250 |
-
$params = \array_merge([function () {
|
1251 |
-
return new static(\func_get_args());
|
1252 |
-
}, $this->items], $arrayableItems);
|
1253 |
-
return new static(\array_map(...$params));
|
1254 |
-
}
|
1255 |
-
/**
|
1256 |
-
* Pad collection to the specified length with a value.
|
1257 |
-
*
|
1258 |
-
* @param int $size
|
1259 |
-
* @param mixed $value
|
1260 |
-
* @return static
|
1261 |
-
*/
|
1262 |
-
public function pad($size, $value)
|
1263 |
-
{
|
1264 |
-
return new static(\array_pad($this->items, $size, $value));
|
1265 |
-
}
|
1266 |
-
/**
|
1267 |
-
* Get an iterator for the items.
|
1268 |
-
*
|
1269 |
-
* @return \ArrayIterator
|
1270 |
-
*/
|
1271 |
-
#[\ReturnTypeWillChange]
|
1272 |
-
public function getIterator()
|
1273 |
-
{
|
1274 |
-
return new ArrayIterator($this->items);
|
1275 |
-
}
|
1276 |
-
/**
|
1277 |
-
* Count the number of items in the collection.
|
1278 |
-
*
|
1279 |
-
* @return int
|
1280 |
-
*/
|
1281 |
-
#[\ReturnTypeWillChange]
|
1282 |
-
public function count()
|
1283 |
-
{
|
1284 |
-
return \count($this->items);
|
1285 |
-
}
|
1286 |
-
/**
|
1287 |
-
* Count the number of items in the collection by a field or using a callback.
|
1288 |
-
*
|
1289 |
-
* @param callable|string $countBy
|
1290 |
-
* @return static
|
1291 |
-
*/
|
1292 |
-
public function countBy($countBy = null)
|
1293 |
-
{
|
1294 |
-
return new static($this->lazy()->countBy($countBy)->all());
|
1295 |
-
}
|
1296 |
-
/**
|
1297 |
-
* Add an item to the collection.
|
1298 |
-
*
|
1299 |
-
* @param mixed $item
|
1300 |
-
* @return $this
|
1301 |
-
*/
|
1302 |
-
public function add($item)
|
1303 |
-
{
|
1304 |
-
$this->items[] = $item;
|
1305 |
-
return $this;
|
1306 |
-
}
|
1307 |
-
/**
|
1308 |
-
* Get a base Support collection instance from this collection.
|
1309 |
-
*
|
1310 |
-
* @return \Illuminate\Support\Collection
|
1311 |
-
*/
|
1312 |
-
public function toBase()
|
1313 |
-
{
|
1314 |
-
return new self($this);
|
1315 |
-
}
|
1316 |
-
/**
|
1317 |
-
* Determine if an item exists at an offset.
|
1318 |
-
*
|
1319 |
-
* @param mixed $key
|
1320 |
-
* @return bool
|
1321 |
-
*/
|
1322 |
-
#[\ReturnTypeWillChange]
|
1323 |
-
public function offsetExists($key)
|
1324 |
-
{
|
1325 |
-
return isset($this->items[$key]);
|
1326 |
-
}
|
1327 |
-
/**
|
1328 |
-
* Get an item at a given offset.
|
1329 |
-
*
|
1330 |
-
* @param mixed $key
|
1331 |
-
* @return mixed
|
1332 |
-
*/
|
1333 |
-
#[\ReturnTypeWillChange]
|
1334 |
-
public function offsetGet($key)
|
1335 |
-
{
|
1336 |
-
return $this->items[$key];
|
1337 |
-
}
|
1338 |
-
/**
|
1339 |
-
* Set the item at a given offset.
|
1340 |
-
*
|
1341 |
-
* @param mixed $key
|
1342 |
-
* @param mixed $value
|
1343 |
-
* @return void
|
1344 |
-
*/
|
1345 |
-
#[\ReturnTypeWillChange]
|
1346 |
-
public function offsetSet($key, $value)
|
1347 |
-
{
|
1348 |
-
if (\is_null($key)) {
|
1349 |
-
$this->items[] = $value;
|
1350 |
-
} else {
|
1351 |
-
$this->items[$key] = $value;
|
1352 |
-
}
|
1353 |
-
}
|
1354 |
-
/**
|
1355 |
-
* Unset the item at a given offset.
|
1356 |
-
*
|
1357 |
-
* @param string $key
|
1358 |
-
* @return void
|
1359 |
-
*/
|
1360 |
-
#[\ReturnTypeWillChange]
|
1361 |
-
public function offsetUnset($key)
|
1362 |
-
{
|
1363 |
-
unset($this->items[$key]);
|
1364 |
-
}
|
1365 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/collections/Enumerable.php
DELETED
@@ -1,907 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Support;
|
4 |
-
|
5 |
-
use Countable;
|
6 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Support\Arrayable;
|
7 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Support\Jsonable;
|
8 |
-
use IteratorAggregate;
|
9 |
-
use JsonSerializable;
|
10 |
-
interface Enumerable extends Arrayable, Countable, IteratorAggregate, Jsonable, JsonSerializable
|
11 |
-
{
|
12 |
-
/**
|
13 |
-
* Create a new collection instance if the value isn't one already.
|
14 |
-
*
|
15 |
-
* @param mixed $items
|
16 |
-
* @return static
|
17 |
-
*/
|
18 |
-
public static function make($items = []);
|
19 |
-
/**
|
20 |
-
* Create a new instance by invoking the callback a given amount of times.
|
21 |
-
*
|
22 |
-
* @param int $number
|
23 |
-
* @param callable|null $callback
|
24 |
-
* @return static
|
25 |
-
*/
|
26 |
-
public static function times($number, callable $callback = null);
|
27 |
-
/**
|
28 |
-
* Create a collection with the given range.
|
29 |
-
*
|
30 |
-
* @param int $from
|
31 |
-
* @param int $to
|
32 |
-
* @return static
|
33 |
-
*/
|
34 |
-
public static function range($from, $to);
|
35 |
-
/**
|
36 |
-
* Wrap the given value in a collection if applicable.
|
37 |
-
*
|
38 |
-
* @param mixed $value
|
39 |
-
* @return static
|
40 |
-
*/
|
41 |
-
public static function wrap($value);
|
42 |
-
/**
|
43 |
-
* Get the underlying items from the given collection if applicable.
|
44 |
-
*
|
45 |
-
* @param array|static $value
|
46 |
-
* @return array
|
47 |
-
*/
|
48 |
-
public static function unwrap($value);
|
49 |
-
/**
|
50 |
-
* Create a new instance with no items.
|
51 |
-
*
|
52 |
-
* @return static
|
53 |
-
*/
|
54 |
-
public static function empty();
|
55 |
-
/**
|
56 |
-
* Get all items in the enumerable.
|
57 |
-
*
|
58 |
-
* @return array
|
59 |
-
*/
|
60 |
-
public function all();
|
61 |
-
/**
|
62 |
-
* Alias for the "avg" method.
|
63 |
-
*
|
64 |
-
* @param callable|string|null $callback
|
65 |
-
* @return mixed
|
66 |
-
*/
|
67 |
-
public function average($callback = null);
|
68 |
-
/**
|
69 |
-
* Get the median of a given key.
|
70 |
-
*
|
71 |
-
* @param string|array|null $key
|
72 |
-
* @return mixed
|
73 |
-
*/
|
74 |
-
public function median($key = null);
|
75 |
-
/**
|
76 |
-
* Get the mode of a given key.
|
77 |
-
*
|
78 |
-
* @param string|array|null $key
|
79 |
-
* @return array|null
|
80 |
-
*/
|
81 |
-
public function mode($key = null);
|
82 |
-
/**
|
83 |
-
* Collapse the items into a single enumerable.
|
84 |
-
*
|
85 |
-
* @return static
|
86 |
-
*/
|
87 |
-
public function collapse();
|
88 |
-
/**
|
89 |
-
* Alias for the "contains" method.
|
90 |
-
*
|
91 |
-
* @param mixed $key
|
92 |
-
* @param mixed $operator
|
93 |
-
* @param mixed $value
|
94 |
-
* @return bool
|
95 |
-
*/
|
96 |
-
public function some($key, $operator = null, $value = null);
|
97 |
-
/**
|
98 |
-
* Determine if an item exists, using strict comparison.
|
99 |
-
*
|
100 |
-
* @param mixed $key
|
101 |
-
* @param mixed $value
|
102 |
-
* @return bool
|
103 |
-
*/
|
104 |
-
public function containsStrict($key, $value = null);
|
105 |
-
/**
|
106 |
-
* Get the average value of a given key.
|
107 |
-
*
|
108 |
-
* @param callable|string|null $callback
|
109 |
-
* @return mixed
|
110 |
-
*/
|
111 |
-
public function avg($callback = null);
|
112 |
-
/**
|
113 |
-
* Determine if an item exists in the enumerable.
|
114 |
-
*
|
115 |
-
* @param mixed $key
|
116 |
-
* @param mixed $operator
|
117 |
-
* @param mixed $value
|
118 |
-
* @return bool
|
119 |
-
*/
|
120 |
-
public function contains($key, $operator = null, $value = null);
|
121 |
-
/**
|
122 |
-
* Cross join with the given lists, returning all possible permutations.
|
123 |
-
*
|
124 |
-
* @param mixed ...$lists
|
125 |
-
* @return static
|
126 |
-
*/
|
127 |
-
public function crossJoin(...$lists);
|
128 |
-
/**
|
129 |
-
* Dump the collection and end the script.
|
130 |
-
*
|
131 |
-
* @param mixed ...$args
|
132 |
-
* @return void
|
133 |
-
*/
|
134 |
-
public function dd(...$args);
|
135 |
-
/**
|
136 |
-
* Dump the collection.
|
137 |
-
*
|
138 |
-
* @return $this
|
139 |
-
*/
|
140 |
-
public function dump();
|
141 |
-
/**
|
142 |
-
* Get the items that are not present in the given items.
|
143 |
-
*
|
144 |
-
* @param mixed $items
|
145 |
-
* @return static
|
146 |
-
*/
|
147 |
-
public function diff($items);
|
148 |
-
/**
|
149 |
-
* Get the items that are not present in the given items, using the callback.
|
150 |
-
*
|
151 |
-
* @param mixed $items
|
152 |
-
* @param callable $callback
|
153 |
-
* @return static
|
154 |
-
*/
|
155 |
-
public function diffUsing($items, callable $callback);
|
156 |
-
/**
|
157 |
-
* Get the items whose keys and values are not present in the given items.
|
158 |
-
*
|
159 |
-
* @param mixed $items
|
160 |
-
* @return static
|
161 |
-
*/
|
162 |
-
public function diffAssoc($items);
|
163 |
-
/**
|
164 |
-
* Get the items whose keys and values are not present in the given items, using the callback.
|
165 |
-
*
|
166 |
-
* @param mixed $items
|
167 |
-
* @param callable $callback
|
168 |
-
* @return static
|
169 |
-
*/
|
170 |
-
public function diffAssocUsing($items, callable $callback);
|
171 |
-
/**
|
172 |
-
* Get the items whose keys are not present in the given items.
|
173 |
-
*
|
174 |
-
* @param mixed $items
|
175 |
-
* @return static
|
176 |
-
*/
|
177 |
-
public function diffKeys($items);
|
178 |
-
/**
|
179 |
-
* Get the items whose keys are not present in the given items, using the callback.
|
180 |
-
*
|
181 |
-
* @param mixed $items
|
182 |
-
* @param callable $callback
|
183 |
-
* @return static
|
184 |
-
*/
|
185 |
-
public function diffKeysUsing($items, callable $callback);
|
186 |
-
/**
|
187 |
-
* Retrieve duplicate items.
|
188 |
-
*
|
189 |
-
* @param callable|string|null $callback
|
190 |
-
* @param bool $strict
|
191 |
-
* @return static
|
192 |
-
*/
|
193 |
-
public function duplicates($callback = null, $strict = \false);
|
194 |
-
/**
|
195 |
-
* Retrieve duplicate items using strict comparison.
|
196 |
-
*
|
197 |
-
* @param callable|string|null $callback
|
198 |
-
* @return static
|
199 |
-
*/
|
200 |
-
public function duplicatesStrict($callback = null);
|
201 |
-
/**
|
202 |
-
* Execute a callback over each item.
|
203 |
-
*
|
204 |
-
* @param callable $callback
|
205 |
-
* @return $this
|
206 |
-
*/
|
207 |
-
public function each(callable $callback);
|
208 |
-
/**
|
209 |
-
* Execute a callback over each nested chunk of items.
|
210 |
-
*
|
211 |
-
* @param callable $callback
|
212 |
-
* @return static
|
213 |
-
*/
|
214 |
-
public function eachSpread(callable $callback);
|
215 |
-
/**
|
216 |
-
* Determine if all items pass the given truth test.
|
217 |
-
*
|
218 |
-
* @param string|callable $key
|
219 |
-
* @param mixed $operator
|
220 |
-
* @param mixed $value
|
221 |
-
* @return bool
|
222 |
-
*/
|
223 |
-
public function every($key, $operator = null, $value = null);
|
224 |
-
/**
|
225 |
-
* Get all items except for those with the specified keys.
|
226 |
-
*
|
227 |
-
* @param mixed $keys
|
228 |
-
* @return static
|
229 |
-
*/
|
230 |
-
public function except($keys);
|
231 |
-
/**
|
232 |
-
* Run a filter over each of the items.
|
233 |
-
*
|
234 |
-
* @param callable|null $callback
|
235 |
-
* @return static
|
236 |
-
*/
|
237 |
-
public function filter(callable $callback = null);
|
238 |
-
/**
|
239 |
-
* Apply the callback if the value is truthy.
|
240 |
-
*
|
241 |
-
* @param bool $value
|
242 |
-
* @param callable $callback
|
243 |
-
* @param callable|null $default
|
244 |
-
* @return static|mixed
|
245 |
-
*/
|
246 |
-
public function when($value, callable $callback, callable $default = null);
|
247 |
-
/**
|
248 |
-
* Apply the callback if the collection is empty.
|
249 |
-
*
|
250 |
-
* @param callable $callback
|
251 |
-
* @param callable|null $default
|
252 |
-
* @return static|mixed
|
253 |
-
*/
|
254 |
-
public function whenEmpty(callable $callback, callable $default = null);
|
255 |
-
/**
|
256 |
-
* Apply the callback if the collection is not empty.
|
257 |
-
*
|
258 |
-
* @param callable $callback
|
259 |
-
* @param callable|null $default
|
260 |
-
* @return static|mixed
|
261 |
-
*/
|
262 |
-
public function whenNotEmpty(callable $callback, callable $default = null);
|
263 |
-
/**
|
264 |
-
* Apply the callback if the value is falsy.
|
265 |
-
*
|
266 |
-
* @param bool $value
|
267 |
-
* @param callable $callback
|
268 |
-
* @param callable|null $default
|
269 |
-
* @return static|mixed
|
270 |
-
*/
|
271 |
-
public function unless($value, callable $callback, callable $default = null);
|
272 |
-
/**
|
273 |
-
* Apply the callback unless the collection is empty.
|
274 |
-
*
|
275 |
-
* @param callable $callback
|
276 |
-
* @param callable|null $default
|
277 |
-
* @return static|mixed
|
278 |
-
*/
|
279 |
-
public function unlessEmpty(callable $callback, callable $default = null);
|
280 |
-
/**
|
281 |
-
* Apply the callback unless the collection is not empty.
|
282 |
-
*
|
283 |
-
* @param callable $callback
|
284 |
-
* @param callable|null $default
|
285 |
-
* @return static|mixed
|
286 |
-
*/
|
287 |
-
public function unlessNotEmpty(callable $callback, callable $default = null);
|
288 |
-
/**
|
289 |
-
* Filter items by the given key value pair.
|
290 |
-
*
|
291 |
-
* @param string $key
|
292 |
-
* @param mixed $operator
|
293 |
-
* @param mixed $value
|
294 |
-
* @return static
|
295 |
-
*/
|
296 |
-
public function where($key, $operator = null, $value = null);
|
297 |
-
/**
|
298 |
-
* Filter items where the value for the given key is null.
|
299 |
-
*
|
300 |
-
* @param string|null $key
|
301 |
-
* @return static
|
302 |
-
*/
|
303 |
-
public function whereNull($key = null);
|
304 |
-
/**
|
305 |
-
* Filter items where the value for the given key is not null.
|
306 |
-
*
|
307 |
-
* @param string|null $key
|
308 |
-
* @return static
|
309 |
-
*/
|
310 |
-
public function whereNotNull($key = null);
|
311 |
-
/**
|
312 |
-
* Filter items by the given key value pair using strict comparison.
|
313 |
-
*
|
314 |
-
* @param string $key
|
315 |
-
* @param mixed $value
|
316 |
-
* @return static
|
317 |
-
*/
|
318 |
-
public function whereStrict($key, $value);
|
319 |
-
/**
|
320 |
-
* Filter items by the given key value pair.
|
321 |
-
*
|
322 |
-
* @param string $key
|
323 |
-
* @param mixed $values
|
324 |
-
* @param bool $strict
|
325 |
-
* @return static
|
326 |
-
*/
|
327 |
-
public function whereIn($key, $values, $strict = \false);
|
328 |
-
/**
|
329 |
-
* Filter items by the given key value pair using strict comparison.
|
330 |
-
*
|
331 |
-
* @param string $key
|
332 |
-
* @param mixed $values
|
333 |
-
* @return static
|
334 |
-
*/
|
335 |
-
public function whereInStrict($key, $values);
|
336 |
-
/**
|
337 |
-
* Filter items such that the value of the given key is between the given values.
|
338 |
-
*
|
339 |
-
* @param string $key
|
340 |
-
* @param array $values
|
341 |
-
* @return static
|
342 |
-
*/
|
343 |
-
public function whereBetween($key, $values);
|
344 |
-
/**
|
345 |
-
* Filter items such that the value of the given key is not between the given values.
|
346 |
-
*
|
347 |
-
* @param string $key
|
348 |
-
* @param array $values
|
349 |
-
* @return static
|
350 |
-
*/
|
351 |
-
public function whereNotBetween($key, $values);
|
352 |
-
/**
|
353 |
-
* Filter items by the given key value pair.
|
354 |
-
*
|
355 |
-
* @param string $key
|
356 |
-
* @param mixed $values
|
357 |
-
* @param bool $strict
|
358 |
-
* @return static
|
359 |
-
*/
|
360 |
-
public function whereNotIn($key, $values, $strict = \false);
|
361 |
-
/**
|
362 |
-
* Filter items by the given key value pair using strict comparison.
|
363 |
-
*
|
364 |
-
* @param string $key
|
365 |
-
* @param mixed $values
|
366 |
-
* @return static
|
367 |
-
*/
|
368 |
-
public function whereNotInStrict($key, $values);
|
369 |
-
/**
|
370 |
-
* Filter the items, removing any items that don't match the given type(s).
|
371 |
-
*
|
372 |
-
* @param string|string[] $type
|
373 |
-
* @return static
|
374 |
-
*/
|
375 |
-
public function whereInstanceOf($type);
|
376 |
-
/**
|
377 |
-
* Get the first item from the enumerable passing the given truth test.
|
378 |
-
*
|
379 |
-
* @param callable|null $callback
|
380 |
-
* @param mixed $default
|
381 |
-
* @return mixed
|
382 |
-
*/
|
383 |
-
public function first(callable $callback = null, $default = null);
|
384 |
-
/**
|
385 |
-
* Get the first item by the given key value pair.
|
386 |
-
*
|
387 |
-
* @param string $key
|
388 |
-
* @param mixed $operator
|
389 |
-
* @param mixed $value
|
390 |
-
* @return mixed
|
391 |
-
*/
|
392 |
-
public function firstWhere($key, $operator = null, $value = null);
|
393 |
-
/**
|
394 |
-
* Get a flattened array of the items in the collection.
|
395 |
-
*
|
396 |
-
* @param int $depth
|
397 |
-
* @return static
|
398 |
-
*/
|
399 |
-
public function flatten($depth = \INF);
|
400 |
-
/**
|
401 |
-
* Flip the values with their keys.
|
402 |
-
*
|
403 |
-
* @return static
|
404 |
-
*/
|
405 |
-
public function flip();
|
406 |
-
/**
|
407 |
-
* Get an item from the collection by key.
|
408 |
-
*
|
409 |
-
* @param mixed $key
|
410 |
-
* @param mixed $default
|
411 |
-
* @return mixed
|
412 |
-
*/
|
413 |
-
public function get($key, $default = null);
|
414 |
-
/**
|
415 |
-
* Group an associative array by a field or using a callback.
|
416 |
-
*
|
417 |
-
* @param array|callable|string $groupBy
|
418 |
-
* @param bool $preserveKeys
|
419 |
-
* @return static
|
420 |
-
*/
|
421 |
-
public function groupBy($groupBy, $preserveKeys = \false);
|
422 |
-
/**
|
423 |
-
* Key an associative array by a field or using a callback.
|
424 |
-
*
|
425 |
-
* @param callable|string $keyBy
|
426 |
-
* @return static
|
427 |
-
*/
|
428 |
-
public function keyBy($keyBy);
|
429 |
-
/**
|
430 |
-
* Determine if an item exists in the collection by key.
|
431 |
-
*
|
432 |
-
* @param mixed $key
|
433 |
-
* @return bool
|
434 |
-
*/
|
435 |
-
public function has($key);
|
436 |
-
/**
|
437 |
-
* Concatenate values of a given key as a string.
|
438 |
-
*
|
439 |
-
* @param string $value
|
440 |
-
* @param string|null $glue
|
441 |
-
* @return string
|
442 |
-
*/
|
443 |
-
public function implode($value, $glue = null);
|
444 |
-
/**
|
445 |
-
* Intersect the collection with the given items.
|
446 |
-
*
|
447 |
-
* @param mixed $items
|
448 |
-
* @return static
|
449 |
-
*/
|
450 |
-
public function intersect($items);
|
451 |
-
/**
|
452 |
-
* Intersect the collection with the given items by key.
|
453 |
-
*
|
454 |
-
* @param mixed $items
|
455 |
-
* @return static
|
456 |
-
*/
|
457 |
-
public function intersectByKeys($items);
|
458 |
-
/**
|
459 |
-
* Determine if the collection is empty or not.
|
460 |
-
*
|
461 |
-
* @return bool
|
462 |
-
*/
|
463 |
-
public function isEmpty();
|
464 |
-
/**
|
465 |
-
* Determine if the collection is not empty.
|
466 |
-
*
|
467 |
-
* @return bool
|
468 |
-
*/
|
469 |
-
public function isNotEmpty();
|
470 |
-
/**
|
471 |
-
* Join all items from the collection using a string. The final items can use a separate glue string.
|
472 |
-
*
|
473 |
-
* @param string $glue
|
474 |
-
* @param string $finalGlue
|
475 |
-
* @return string
|
476 |
-
*/
|
477 |
-
public function join($glue, $finalGlue = '');
|
478 |
-
/**
|
479 |
-
* Get the keys of the collection items.
|
480 |
-
*
|
481 |
-
* @return static
|
482 |
-
*/
|
483 |
-
public function keys();
|
484 |
-
/**
|
485 |
-
* Get the last item from the collection.
|
486 |
-
*
|
487 |
-
* @param callable|null $callback
|
488 |
-
* @param mixed $default
|
489 |
-
* @return mixed
|
490 |
-
*/
|
491 |
-
public function last(callable $callback = null, $default = null);
|
492 |
-
/**
|
493 |
-
* Run a map over each of the items.
|
494 |
-
*
|
495 |
-
* @param callable $callback
|
496 |
-
* @return static
|
497 |
-
*/
|
498 |
-
public function map(callable $callback);
|
499 |
-
/**
|
500 |
-
* Run a map over each nested chunk of items.
|
501 |
-
*
|
502 |
-
* @param callable $callback
|
503 |
-
* @return static
|
504 |
-
*/
|
505 |
-
public function mapSpread(callable $callback);
|
506 |
-
/**
|
507 |
-
* Run a dictionary map over the items.
|
508 |
-
*
|
509 |
-
* The callback should return an associative array with a single key/value pair.
|
510 |
-
*
|
511 |
-
* @param callable $callback
|
512 |
-
* @return static
|
513 |
-
*/
|
514 |
-
public function mapToDictionary(callable $callback);
|
515 |
-
/**
|
516 |
-
* Run a grouping map over the items.
|
517 |
-
*
|
518 |
-
* The callback should return an associative array with a single key/value pair.
|
519 |
-
*
|
520 |
-
* @param callable $callback
|
521 |
-
* @return static
|
522 |
-
*/
|
523 |
-
public function mapToGroups(callable $callback);
|
524 |
-
/**
|
525 |
-
* Run an associative map over each of the items.
|
526 |
-
*
|
527 |
-
* The callback should return an associative array with a single key/value pair.
|
528 |
-
*
|
529 |
-
* @param callable $callback
|
530 |
-
* @return static
|
531 |
-
*/
|
532 |
-
public function mapWithKeys(callable $callback);
|
533 |
-
/**
|
534 |
-
* Map a collection and flatten the result by a single level.
|
535 |
-
*
|
536 |
-
* @param callable $callback
|
537 |
-
* @return static
|
538 |
-
*/
|
539 |
-
public function flatMap(callable $callback);
|
540 |
-
/**
|
541 |
-
* Map the values into a new class.
|
542 |
-
*
|
543 |
-
* @param string $class
|
544 |
-
* @return static
|
545 |
-
*/
|
546 |
-
public function mapInto($class);
|
547 |
-
/**
|
548 |
-
* Merge the collection with the given items.
|
549 |
-
*
|
550 |
-
* @param mixed $items
|
551 |
-
* @return static
|
552 |
-
*/
|
553 |
-
public function merge($items);
|
554 |
-
/**
|
555 |
-
* Recursively merge the collection with the given items.
|
556 |
-
*
|
557 |
-
* @param mixed $items
|
558 |
-
* @return static
|
559 |
-
*/
|
560 |
-
public function mergeRecursive($items);
|
561 |
-
/**
|
562 |
-
* Create a collection by using this collection for keys and another for its values.
|
563 |
-
*
|
564 |
-
* @param mixed $values
|
565 |
-
* @return static
|
566 |
-
*/
|
567 |
-
public function combine($values);
|
568 |
-
/**
|
569 |
-
* Union the collection with the given items.
|
570 |
-
*
|
571 |
-
* @param mixed $items
|
572 |
-
* @return static
|
573 |
-
*/
|
574 |
-
public function union($items);
|
575 |
-
/**
|
576 |
-
* Get the min value of a given key.
|
577 |
-
*
|
578 |
-
* @param callable|string|null $callback
|
579 |
-
* @return mixed
|
580 |
-
*/
|
581 |
-
public function min($callback = null);
|
582 |
-
/**
|
583 |
-
* Get the max value of a given key.
|
584 |
-
*
|
585 |
-
* @param callable|string|null $callback
|
586 |
-
* @return mixed
|
587 |
-
*/
|
588 |
-
public function max($callback = null);
|
589 |
-
/**
|
590 |
-
* Create a new collection consisting of every n-th element.
|
591 |
-
*
|
592 |
-
* @param int $step
|
593 |
-
* @param int $offset
|
594 |
-
* @return static
|
595 |
-
*/
|
596 |
-
public function nth($step, $offset = 0);
|
597 |
-
/**
|
598 |
-
* Get the items with the specified keys.
|
599 |
-
*
|
600 |
-
* @param mixed $keys
|
601 |
-
* @return static
|
602 |
-
*/
|
603 |
-
public function only($keys);
|
604 |
-
/**
|
605 |
-
* "Paginate" the collection by slicing it into a smaller collection.
|
606 |
-
*
|
607 |
-
* @param int $page
|
608 |
-
* @param int $perPage
|
609 |
-
* @return static
|
610 |
-
*/
|
611 |
-
public function forPage($page, $perPage);
|
612 |
-
/**
|
613 |
-
* Partition the collection into two arrays using the given callback or key.
|
614 |
-
*
|
615 |
-
* @param callable|string $key
|
616 |
-
* @param mixed $operator
|
617 |
-
* @param mixed $value
|
618 |
-
* @return static
|
619 |
-
*/
|
620 |
-
public function partition($key, $operator = null, $value = null);
|
621 |
-
/**
|
622 |
-
* Push all of the given items onto the collection.
|
623 |
-
*
|
624 |
-
* @param iterable $source
|
625 |
-
* @return static
|
626 |
-
*/
|
627 |
-
public function concat($source);
|
628 |
-
/**
|
629 |
-
* Get one or a specified number of items randomly from the collection.
|
630 |
-
*
|
631 |
-
* @param int|null $number
|
632 |
-
* @return static|mixed
|
633 |
-
*
|
634 |
-
* @throws \InvalidArgumentException
|
635 |
-
*/
|
636 |
-
public function random($number = null);
|
637 |
-
/**
|
638 |
-
* Reduce the collection to a single value.
|
639 |
-
*
|
640 |
-
* @param callable $callback
|
641 |
-
* @param mixed $initial
|
642 |
-
* @return mixed
|
643 |
-
*/
|
644 |
-
public function reduce(callable $callback, $initial = null);
|
645 |
-
/**
|
646 |
-
* Replace the collection items with the given items.
|
647 |
-
*
|
648 |
-
* @param mixed $items
|
649 |
-
* @return static
|
650 |
-
*/
|
651 |
-
public function replace($items);
|
652 |
-
/**
|
653 |
-
* Recursively replace the collection items with the given items.
|
654 |
-
*
|
655 |
-
* @param mixed $items
|
656 |
-
* @return static
|
657 |
-
*/
|
658 |
-
public function replaceRecursive($items);
|
659 |
-
/**
|
660 |
-
* Reverse items order.
|
661 |
-
*
|
662 |
-
* @return static
|
663 |
-
*/
|
664 |
-
public function reverse();
|
665 |
-
/**
|
666 |
-
* Search the collection for a given value and return the corresponding key if successful.
|
667 |
-
*
|
668 |
-
* @param mixed $value
|
669 |
-
* @param bool $strict
|
670 |
-
* @return mixed
|
671 |
-
*/
|
672 |
-
public function search($value, $strict = \false);
|
673 |
-
/**
|
674 |
-
* Shuffle the items in the collection.
|
675 |
-
*
|
676 |
-
* @param int|null $seed
|
677 |
-
* @return static
|
678 |
-
*/
|
679 |
-
public function shuffle($seed = null);
|
680 |
-
/**
|
681 |
-
* Skip the first {$count} items.
|
682 |
-
*
|
683 |
-
* @param int $count
|
684 |
-
* @return static
|
685 |
-
*/
|
686 |
-
public function skip($count);
|
687 |
-
/**
|
688 |
-
* Skip items in the collection until the given condition is met.
|
689 |
-
*
|
690 |
-
* @param mixed $value
|
691 |
-
* @return static
|
692 |
-
*/
|
693 |
-
public function skipUntil($value);
|
694 |
-
/**
|
695 |
-
* Skip items in the collection while the given condition is met.
|
696 |
-
*
|
697 |
-
* @param mixed $value
|
698 |
-
* @return static
|
699 |
-
*/
|
700 |
-
public function skipWhile($value);
|
701 |
-
/**
|
702 |
-
* Get a slice of items from the enumerable.
|
703 |
-
*
|
704 |
-
* @param int $offset
|
705 |
-
* @param int|null $length
|
706 |
-
* @return static
|
707 |
-
*/
|
708 |
-
public function slice($offset, $length = null);
|
709 |
-
/**
|
710 |
-
* Split a collection into a certain number of groups.
|
711 |
-
*
|
712 |
-
* @param int $numberOfGroups
|
713 |
-
* @return static
|
714 |
-
*/
|
715 |
-
public function split($numberOfGroups);
|
716 |
-
/**
|
717 |
-
* Chunk the collection into chunks of the given size.
|
718 |
-
*
|
719 |
-
* @param int $size
|
720 |
-
* @return static
|
721 |
-
*/
|
722 |
-
public function chunk($size);
|
723 |
-
/**
|
724 |
-
* Chunk the collection into chunks with a callback.
|
725 |
-
*
|
726 |
-
* @param callable $callback
|
727 |
-
* @return static
|
728 |
-
*/
|
729 |
-
public function chunkWhile(callable $callback);
|
730 |
-
/**
|
731 |
-
* Sort through each item with a callback.
|
732 |
-
*
|
733 |
-
* @param callable|null|int $callback
|
734 |
-
* @return static
|
735 |
-
*/
|
736 |
-
public function sort($callback = null);
|
737 |
-
/**
|
738 |
-
* Sort items in descending order.
|
739 |
-
*
|
740 |
-
* @param int $options
|
741 |
-
* @return static
|
742 |
-
*/
|
743 |
-
public function sortDesc($options = \SORT_REGULAR);
|
744 |
-
/**
|
745 |
-
* Sort the collection using the given callback.
|
746 |
-
*
|
747 |
-
* @param callable|string $callback
|
748 |
-
* @param int $options
|
749 |
-
* @param bool $descending
|
750 |
-
* @return static
|
751 |
-
*/
|
752 |
-
public function sortBy($callback, $options = \SORT_REGULAR, $descending = \false);
|
753 |
-
/**
|
754 |
-
* Sort the collection in descending order using the given callback.
|
755 |
-
*
|
756 |
-
* @param callable|string $callback
|
757 |
-
* @param int $options
|
758 |
-
* @return static
|
759 |
-
*/
|
760 |
-
public function sortByDesc($callback, $options = \SORT_REGULAR);
|
761 |
-
/**
|
762 |
-
* Sort the collection keys.
|
763 |
-
*
|
764 |
-
* @param int $options
|
765 |
-
* @param bool $descending
|
766 |
-
* @return static
|
767 |
-
*/
|
768 |
-
public function sortKeys($options = \SORT_REGULAR, $descending = \false);
|
769 |
-
/**
|
770 |
-
* Sort the collection keys in descending order.
|
771 |
-
*
|
772 |
-
* @param int $options
|
773 |
-
* @return static
|
774 |
-
*/
|
775 |
-
public function sortKeysDesc($options = \SORT_REGULAR);
|
776 |
-
/**
|
777 |
-
* Get the sum of the given values.
|
778 |
-
*
|
779 |
-
* @param callable|string|null $callback
|
780 |
-
* @return mixed
|
781 |
-
*/
|
782 |
-
public function sum($callback = null);
|
783 |
-
/**
|
784 |
-
* Take the first or last {$limit} items.
|
785 |
-
*
|
786 |
-
* @param int $limit
|
787 |
-
* @return static
|
788 |
-
*/
|
789 |
-
public function take($limit);
|
790 |
-
/**
|
791 |
-
* Take items in the collection until the given condition is met.
|
792 |
-
*
|
793 |
-
* @param mixed $value
|
794 |
-
* @return static
|
795 |
-
*/
|
796 |
-
public function takeUntil($value);
|
797 |
-
/**
|
798 |
-
* Take items in the collection while the given condition is met.
|
799 |
-
*
|
800 |
-
* @param mixed $value
|
801 |
-
* @return static
|
802 |
-
*/
|
803 |
-
public function takeWhile($value);
|
804 |
-
/**
|
805 |
-
* Pass the collection to the given callback and then return it.
|
806 |
-
*
|
807 |
-
* @param callable $callback
|
808 |
-
* @return $this
|
809 |
-
*/
|
810 |
-
public function tap(callable $callback);
|
811 |
-
/**
|
812 |
-
* Pass the enumerable to the given callback and return the result.
|
813 |
-
*
|
814 |
-
* @param callable $callback
|
815 |
-
* @return mixed
|
816 |
-
*/
|
817 |
-
public function pipe(callable $callback);
|
818 |
-
/**
|
819 |
-
* Get the values of a given key.
|
820 |
-
*
|
821 |
-
* @param string|array $value
|
822 |
-
* @param string|null $key
|
823 |
-
* @return static
|
824 |
-
*/
|
825 |
-
public function pluck($value, $key = null);
|
826 |
-
/**
|
827 |
-
* Create a collection of all elements that do not pass a given truth test.
|
828 |
-
*
|
829 |
-
* @param callable|mixed $callback
|
830 |
-
* @return static
|
831 |
-
*/
|
832 |
-
public function reject($callback = \true);
|
833 |
-
/**
|
834 |
-
* Return only unique items from the collection array.
|
835 |
-
*
|
836 |
-
* @param string|callable|null $key
|
837 |
-
* @param bool $strict
|
838 |
-
* @return static
|
839 |
-
*/
|
840 |
-
public function unique($key = null, $strict = \false);
|
841 |
-
/**
|
842 |
-
* Return only unique items from the collection array using strict comparison.
|
843 |
-
*
|
844 |
-
* @param string|callable|null $key
|
845 |
-
* @return static
|
846 |
-
*/
|
847 |
-
public function uniqueStrict($key = null);
|
848 |
-
/**
|
849 |
-
* Reset the keys on the underlying array.
|
850 |
-
*
|
851 |
-
* @return static
|
852 |
-
*/
|
853 |
-
public function values();
|
854 |
-
/**
|
855 |
-
* Pad collection to the specified length with a value.
|
856 |
-
*
|
857 |
-
* @param int $size
|
858 |
-
* @param mixed $value
|
859 |
-
* @return static
|
860 |
-
*/
|
861 |
-
public function pad($size, $value);
|
862 |
-
/**
|
863 |
-
* Count the number of items in the collection using a given truth test.
|
864 |
-
*
|
865 |
-
* @param callable|null $callback
|
866 |
-
* @return static
|
867 |
-
*/
|
868 |
-
public function countBy($callback = null);
|
869 |
-
/**
|
870 |
-
* Zip the collection together with one or more arrays.
|
871 |
-
*
|
872 |
-
* e.g. new Collection([1, 2, 3])->zip([4, 5, 6]);
|
873 |
-
* => [[1, 4], [2, 5], [3, 6]]
|
874 |
-
*
|
875 |
-
* @param mixed ...$items
|
876 |
-
* @return static
|
877 |
-
*/
|
878 |
-
public function zip($items);
|
879 |
-
/**
|
880 |
-
* Collect the values into a collection.
|
881 |
-
*
|
882 |
-
* @return \Illuminate\Support\Collection
|
883 |
-
*/
|
884 |
-
public function collect();
|
885 |
-
/**
|
886 |
-
* Convert the collection to its string representation.
|
887 |
-
*
|
888 |
-
* @return string
|
889 |
-
*/
|
890 |
-
public function __toString();
|
891 |
-
/**
|
892 |
-
* Add a method to the list of proxied methods.
|
893 |
-
*
|
894 |
-
* @param string $method
|
895 |
-
* @return void
|
896 |
-
*/
|
897 |
-
public static function proxy($method);
|
898 |
-
/**
|
899 |
-
* Dynamically access collection proxies.
|
900 |
-
*
|
901 |
-
* @param string $key
|
902 |
-
* @return mixed
|
903 |
-
*
|
904 |
-
* @throws \Exception
|
905 |
-
*/
|
906 |
-
public function __get($key);
|
907 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/collections/HigherOrderCollectionProxy.php
DELETED
@@ -1,59 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Support;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* @mixin \Illuminate\Support\Enumerable
|
7 |
-
*/
|
8 |
-
class HigherOrderCollectionProxy
|
9 |
-
{
|
10 |
-
/**
|
11 |
-
* The collection being operated on.
|
12 |
-
*
|
13 |
-
* @var \Illuminate\Support\Enumerable
|
14 |
-
*/
|
15 |
-
protected $collection;
|
16 |
-
/**
|
17 |
-
* The method being proxied.
|
18 |
-
*
|
19 |
-
* @var string
|
20 |
-
*/
|
21 |
-
protected $method;
|
22 |
-
/**
|
23 |
-
* Create a new proxy instance.
|
24 |
-
*
|
25 |
-
* @param \Illuminate\Support\Enumerable $collection
|
26 |
-
* @param string $method
|
27 |
-
* @return void
|
28 |
-
*/
|
29 |
-
public function __construct(Enumerable $collection, $method)
|
30 |
-
{
|
31 |
-
$this->method = $method;
|
32 |
-
$this->collection = $collection;
|
33 |
-
}
|
34 |
-
/**
|
35 |
-
* Proxy accessing an attribute onto the collection items.
|
36 |
-
*
|
37 |
-
* @param string $key
|
38 |
-
* @return mixed
|
39 |
-
*/
|
40 |
-
public function __get($key)
|
41 |
-
{
|
42 |
-
return $this->collection->{$this->method}(function ($value) use($key) {
|
43 |
-
return \is_array($value) ? $value[$key] : $value->{$key};
|
44 |
-
});
|
45 |
-
}
|
46 |
-
/**
|
47 |
-
* Proxy a method call onto the collection items.
|
48 |
-
*
|
49 |
-
* @param string $method
|
50 |
-
* @param array $parameters
|
51 |
-
* @return mixed
|
52 |
-
*/
|
53 |
-
public function __call($method, $parameters)
|
54 |
-
{
|
55 |
-
return $this->collection->{$this->method}(function ($value) use($method, $parameters) {
|
56 |
-
return $value->{$method}(...$parameters);
|
57 |
-
});
|
58 |
-
}
|
59 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/collections/HigherOrderWhenProxy.php
DELETED
@@ -1,55 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Support;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* @mixin \Illuminate\Support\Enumerable
|
7 |
-
*/
|
8 |
-
class HigherOrderWhenProxy
|
9 |
-
{
|
10 |
-
/**
|
11 |
-
* The collection being operated on.
|
12 |
-
*
|
13 |
-
* @var \Illuminate\Support\Enumerable
|
14 |
-
*/
|
15 |
-
protected $collection;
|
16 |
-
/**
|
17 |
-
* The condition for proxying.
|
18 |
-
*
|
19 |
-
* @var bool
|
20 |
-
*/
|
21 |
-
protected $condition;
|
22 |
-
/**
|
23 |
-
* Create a new proxy instance.
|
24 |
-
*
|
25 |
-
* @param \Illuminate\Support\Enumerable $collection
|
26 |
-
* @param bool $condition
|
27 |
-
* @return void
|
28 |
-
*/
|
29 |
-
public function __construct(Enumerable $collection, $condition)
|
30 |
-
{
|
31 |
-
$this->condition = $condition;
|
32 |
-
$this->collection = $collection;
|
33 |
-
}
|
34 |
-
/**
|
35 |
-
* Proxy accessing an attribute onto the collection.
|
36 |
-
*
|
37 |
-
* @param string $key
|
38 |
-
* @return mixed
|
39 |
-
*/
|
40 |
-
public function __get($key)
|
41 |
-
{
|
42 |
-
return $this->condition ? $this->collection->{$key} : $this->collection;
|
43 |
-
}
|
44 |
-
/**
|
45 |
-
* Proxy a method call onto the collection.
|
46 |
-
*
|
47 |
-
* @param string $method
|
48 |
-
* @param array $parameters
|
49 |
-
* @return mixed
|
50 |
-
*/
|
51 |
-
public function __call($method, $parameters)
|
52 |
-
{
|
53 |
-
return $this->condition ? $this->collection->{$method}(...$parameters) : $this->collection;
|
54 |
-
}
|
55 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/collections/ItemNotFoundException.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Support;
|
4 |
-
|
5 |
-
use RuntimeException;
|
6 |
-
class ItemNotFoundException extends RuntimeException
|
7 |
-
{
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/collections/LazyCollection.php
DELETED
@@ -1,1337 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Support;
|
4 |
-
|
5 |
-
use ArrayIterator;
|
6 |
-
use Closure;
|
7 |
-
use DateTimeInterface;
|
8 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Support\CanBeEscapedWhenCastToString;
|
9 |
-
use Data443\gdpr\framework\Illuminate\Support\Traits\EnumeratesValues;
|
10 |
-
use Data443\gdpr\framework\Illuminate\Support\Traits\Macroable;
|
11 |
-
use IteratorAggregate;
|
12 |
-
use stdClass;
|
13 |
-
class LazyCollection implements CanBeEscapedWhenCastToString, Enumerable
|
14 |
-
{
|
15 |
-
use EnumeratesValues, Macroable;
|
16 |
-
/**
|
17 |
-
* The source from which to generate items.
|
18 |
-
*
|
19 |
-
* @var callable|static
|
20 |
-
*/
|
21 |
-
public $source;
|
22 |
-
/**
|
23 |
-
* Create a new lazy collection instance.
|
24 |
-
*
|
25 |
-
* @param mixed $source
|
26 |
-
* @return void
|
27 |
-
*/
|
28 |
-
public function __construct($source = null)
|
29 |
-
{
|
30 |
-
if ($source instanceof Closure || $source instanceof self) {
|
31 |
-
$this->source = $source;
|
32 |
-
} elseif (\is_null($source)) {
|
33 |
-
$this->source = static::empty();
|
34 |
-
} else {
|
35 |
-
$this->source = $this->getArrayableItems($source);
|
36 |
-
}
|
37 |
-
}
|
38 |
-
/**
|
39 |
-
* Create a collection with the given range.
|
40 |
-
*
|
41 |
-
* @param int $from
|
42 |
-
* @param int $to
|
43 |
-
* @return static
|
44 |
-
*/
|
45 |
-
public static function range($from, $to)
|
46 |
-
{
|
47 |
-
return new static(function () use($from, $to) {
|
48 |
-
if ($from <= $to) {
|
49 |
-
for (; $from <= $to; $from++) {
|
50 |
-
(yield $from);
|
51 |
-
}
|
52 |
-
} else {
|
53 |
-
for (; $from >= $to; $from--) {
|
54 |
-
(yield $from);
|
55 |
-
}
|
56 |
-
}
|
57 |
-
});
|
58 |
-
}
|
59 |
-
/**
|
60 |
-
* Get all items in the enumerable.
|
61 |
-
*
|
62 |
-
* @return array
|
63 |
-
*/
|
64 |
-
public function all()
|
65 |
-
{
|
66 |
-
if (\is_array($this->source)) {
|
67 |
-
return $this->source;
|
68 |
-
}
|
69 |
-
return \iterator_to_array($this->getIterator());
|
70 |
-
}
|
71 |
-
/**
|
72 |
-
* Eager load all items into a new lazy collection backed by an array.
|
73 |
-
*
|
74 |
-
* @return static
|
75 |
-
*/
|
76 |
-
public function eager()
|
77 |
-
{
|
78 |
-
return new static($this->all());
|
79 |
-
}
|
80 |
-
/**
|
81 |
-
* Cache values as they're enumerated.
|
82 |
-
*
|
83 |
-
* @return static
|
84 |
-
*/
|
85 |
-
public function remember()
|
86 |
-
{
|
87 |
-
$iterator = $this->getIterator();
|
88 |
-
$iteratorIndex = 0;
|
89 |
-
$cache = [];
|
90 |
-
return new static(function () use($iterator, &$iteratorIndex, &$cache) {
|
91 |
-
for ($index = 0; \true; $index++) {
|
92 |
-
if (\array_key_exists($index, $cache)) {
|
93 |
-
(yield $cache[$index][0] => $cache[$index][1]);
|
94 |
-
continue;
|
95 |
-
}
|
96 |
-
if ($iteratorIndex < $index) {
|
97 |
-
$iterator->next();
|
98 |
-
$iteratorIndex++;
|
99 |
-
}
|
100 |
-
if (!$iterator->valid()) {
|
101 |
-
break;
|
102 |
-
}
|
103 |
-
$cache[$index] = [$iterator->key(), $iterator->current()];
|
104 |
-
(yield $cache[$index][0] => $cache[$index][1]);
|
105 |
-
}
|
106 |
-
});
|
107 |
-
}
|
108 |
-
/**
|
109 |
-
* Get the average value of a given key.
|
110 |
-
*
|
111 |
-
* @param callable|string|null $callback
|
112 |
-
* @return mixed
|
113 |
-
*/
|
114 |
-
public function avg($callback = null)
|
115 |
-
{
|
116 |
-
return $this->collect()->avg($callback);
|
117 |
-
}
|
118 |
-
/**
|
119 |
-
* Get the median of a given key.
|
120 |
-
*
|
121 |
-
* @param string|array|null $key
|
122 |
-
* @return mixed
|
123 |
-
*/
|
124 |
-
public function median($key = null)
|
125 |
-
{
|
126 |
-
return $this->collect()->median($key);
|
127 |
-
}
|
128 |
-
/**
|
129 |
-
* Get the mode of a given key.
|
130 |
-
*
|
131 |
-
* @param string|array|null $key
|
132 |
-
* @return array|null
|
133 |
-
*/
|
134 |
-
public function mode($key = null)
|
135 |
-
{
|
136 |
-
return $this->collect()->mode($key);
|
137 |
-
}
|
138 |
-
/**
|
139 |
-
* Collapse the collection of items into a single array.
|
140 |
-
*
|
141 |
-
* @return static
|
142 |
-
*/
|
143 |
-
public function collapse()
|
144 |
-
{
|
145 |
-
return new static(function () {
|
146 |
-
foreach ($this as $values) {
|
147 |
-
if (\is_array($values) || $values instanceof Enumerable) {
|
148 |
-
foreach ($values as $value) {
|
149 |
-
(yield $value);
|
150 |
-
}
|
151 |
-
}
|
152 |
-
}
|
153 |
-
});
|
154 |
-
}
|
155 |
-
/**
|
156 |
-
* Determine if an item exists in the enumerable.
|
157 |
-
*
|
158 |
-
* @param mixed $key
|
159 |
-
* @param mixed $operator
|
160 |
-
* @param mixed $value
|
161 |
-
* @return bool
|
162 |
-
*/
|
163 |
-
public function contains($key, $operator = null, $value = null)
|
164 |
-
{
|
165 |
-
if (\func_num_args() === 1 && $this->useAsCallable($key)) {
|
166 |
-
$placeholder = new stdClass();
|
167 |
-
return $this->first($key, $placeholder) !== $placeholder;
|
168 |
-
}
|
169 |
-
if (\func_num_args() === 1) {
|
170 |
-
$needle = $key;
|
171 |
-
foreach ($this as $value) {
|
172 |
-
if ($value == $needle) {
|
173 |
-
return \true;
|
174 |
-
}
|
175 |
-
}
|
176 |
-
return \false;
|
177 |
-
}
|
178 |
-
return $this->contains($this->operatorForWhere(...\func_get_args()));
|
179 |
-
}
|
180 |
-
/**
|
181 |
-
* Cross join the given iterables, returning all possible permutations.
|
182 |
-
*
|
183 |
-
* @param array ...$arrays
|
184 |
-
* @return static
|
185 |
-
*/
|
186 |
-
public function crossJoin(...$arrays)
|
187 |
-
{
|
188 |
-
return $this->passthru('crossJoin', \func_get_args());
|
189 |
-
}
|
190 |
-
/**
|
191 |
-
* Count the number of items in the collection by a field or using a callback.
|
192 |
-
*
|
193 |
-
* @param callable|string $countBy
|
194 |
-
* @return static
|
195 |
-
*/
|
196 |
-
public function countBy($countBy = null)
|
197 |
-
{
|
198 |
-
$countBy = \is_null($countBy) ? $this->identity() : $this->valueRetriever($countBy);
|
199 |
-
return new static(function () use($countBy) {
|
200 |
-
$counts = [];
|
201 |
-
foreach ($this as $key => $value) {
|
202 |
-
$group = $countBy($value, $key);
|
203 |
-
if (empty($counts[$group])) {
|
204 |
-
$counts[$group] = 0;
|
205 |
-
}
|
206 |
-
$counts[$group]++;
|
207 |
-
}
|
208 |
-
yield from $counts;
|
209 |
-
});
|
210 |
-
}
|
211 |
-
/**
|
212 |
-
* Get the items that are not present in the given items.
|
213 |
-
*
|
214 |
-
* @param mixed $items
|
215 |
-
* @return static
|
216 |
-
*/
|
217 |
-
public function diff($items)
|
218 |
-
{
|
219 |
-
return $this->passthru('diff', \func_get_args());
|
220 |
-
}
|
221 |
-
/**
|
222 |
-
* Get the items that are not present in the given items, using the callback.
|
223 |
-
*
|
224 |
-
* @param mixed $items
|
225 |
-
* @param callable $callback
|
226 |
-
* @return static
|
227 |
-
*/
|
228 |
-
public function diffUsing($items, callable $callback)
|
229 |
-
{
|
230 |
-
return $this->passthru('diffUsing', \func_get_args());
|
231 |
-
}
|
232 |
-
/**
|
233 |
-
* Get the items whose keys and values are not present in the given items.
|
234 |
-
*
|
235 |
-
* @param mixed $items
|
236 |
-
* @return static
|
237 |
-
*/
|
238 |
-
public function diffAssoc($items)
|
239 |
-
{
|
240 |
-
return $this->passthru('diffAssoc', \func_get_args());
|
241 |
-
}
|
242 |
-
/**
|
243 |
-
* Get the items whose keys and values are not present in the given items, using the callback.
|
244 |
-
*
|
245 |
-
* @param mixed $items
|
246 |
-
* @param callable $callback
|
247 |
-
* @return static
|
248 |
-
*/
|
249 |
-
public function diffAssocUsing($items, callable $callback)
|
250 |
-
{
|
251 |
-
return $this->passthru('diffAssocUsing', \func_get_args());
|
252 |
-
}
|
253 |
-
/**
|
254 |
-
* Get the items whose keys are not present in the given items.
|
255 |
-
*
|
256 |
-
* @param mixed $items
|
257 |
-
* @return static
|
258 |
-
*/
|
259 |
-
public function diffKeys($items)
|
260 |
-
{
|
261 |
-
return $this->passthru('diffKeys', \func_get_args());
|
262 |
-
}
|
263 |
-
/**
|
264 |
-
* Get the items whose keys are not present in the given items, using the callback.
|
265 |
-
*
|
266 |
-
* @param mixed $items
|
267 |
-
* @param callable $callback
|
268 |
-
* @return static
|
269 |
-
*/
|
270 |
-
public function diffKeysUsing($items, callable $callback)
|
271 |
-
{
|
272 |
-
return $this->passthru('diffKeysUsing', \func_get_args());
|
273 |
-
}
|
274 |
-
/**
|
275 |
-
* Retrieve duplicate items.
|
276 |
-
*
|
277 |
-
* @param callable|string|null $callback
|
278 |
-
* @param bool $strict
|
279 |
-
* @return static
|
280 |
-
*/
|
281 |
-
public function duplicates($callback = null, $strict = \false)
|
282 |
-
{
|
283 |
-
return $this->passthru('duplicates', \func_get_args());
|
284 |
-
}
|
285 |
-
/**
|
286 |
-
* Retrieve duplicate items using strict comparison.
|
287 |
-
*
|
288 |
-
* @param callable|string|null $callback
|
289 |
-
* @return static
|
290 |
-
*/
|
291 |
-
public function duplicatesStrict($callback = null)
|
292 |
-
{
|
293 |
-
return $this->passthru('duplicatesStrict', \func_get_args());
|
294 |
-
}
|
295 |
-
/**
|
296 |
-
* Get all items except for those with the specified keys.
|
297 |
-
*
|
298 |
-
* @param mixed $keys
|
299 |
-
* @return static
|
300 |
-
*/
|
301 |
-
public function except($keys)
|
302 |
-
{
|
303 |
-
return $this->passthru('except', \func_get_args());
|
304 |
-
}
|
305 |
-
/**
|
306 |
-
* Run a filter over each of the items.
|
307 |
-
*
|
308 |
-
* @param callable|null $callback
|
309 |
-
* @return static
|
310 |
-
*/
|
311 |
-
public function filter(callable $callback = null)
|
312 |
-
{
|
313 |
-
if (\is_null($callback)) {
|
314 |
-
$callback = function ($value) {
|
315 |
-
return (bool) $value;
|
316 |
-
};
|
317 |
-
}
|
318 |
-
return new static(function () use($callback) {
|
319 |
-
foreach ($this as $key => $value) {
|
320 |
-
if ($callback($value, $key)) {
|
321 |
-
(yield $key => $value);
|
322 |
-
}
|
323 |
-
}
|
324 |
-
});
|
325 |
-
}
|
326 |
-
/**
|
327 |
-
* Get the first item from the enumerable passing the given truth test.
|
328 |
-
*
|
329 |
-
* @param callable|null $callback
|
330 |
-
* @param mixed $default
|
331 |
-
* @return mixed
|
332 |
-
*/
|
333 |
-
public function first(callable $callback = null, $default = null)
|
334 |
-
{
|
335 |
-
$iterator = $this->getIterator();
|
336 |
-
if (\is_null($callback)) {
|
337 |
-
if (!$iterator->valid()) {
|
338 |
-
return value($default);
|
339 |
-
}
|
340 |
-
return $iterator->current();
|
341 |
-
}
|
342 |
-
foreach ($iterator as $key => $value) {
|
343 |
-
if ($callback($value, $key)) {
|
344 |
-
return $value;
|
345 |
-
}
|
346 |
-
}
|
347 |
-
return value($default);
|
348 |
-
}
|
349 |
-
/**
|
350 |
-
* Get a flattened list of the items in the collection.
|
351 |
-
*
|
352 |
-
* @param int $depth
|
353 |
-
* @return static
|
354 |
-
*/
|
355 |
-
public function flatten($depth = \INF)
|
356 |
-
{
|
357 |
-
$instance = new static(function () use($depth) {
|
358 |
-
foreach ($this as $item) {
|
359 |
-
if (!\is_array($item) && !$item instanceof Enumerable) {
|
360 |
-
(yield $item);
|
361 |
-
} elseif ($depth === 1) {
|
362 |
-
yield from $item;
|
363 |
-
} else {
|
364 |
-
yield from (new static($item))->flatten($depth - 1);
|
365 |
-
}
|
366 |
-
}
|
367 |
-
});
|
368 |
-
return $instance->values();
|
369 |
-
}
|
370 |
-
/**
|
371 |
-
* Flip the items in the collection.
|
372 |
-
*
|
373 |
-
* @return static
|
374 |
-
*/
|
375 |
-
public function flip()
|
376 |
-
{
|
377 |
-
return new static(function () {
|
378 |
-
foreach ($this as $key => $value) {
|
379 |
-
(yield $value => $key);
|
380 |
-
}
|
381 |
-
});
|
382 |
-
}
|
383 |
-
/**
|
384 |
-
* Get an item by key.
|
385 |
-
*
|
386 |
-
* @param mixed $key
|
387 |
-
* @param mixed $default
|
388 |
-
* @return mixed
|
389 |
-
*/
|
390 |
-
public function get($key, $default = null)
|
391 |
-
{
|
392 |
-
if (\is_null($key)) {
|
393 |
-
return;
|
394 |
-
}
|
395 |
-
foreach ($this as $outerKey => $outerValue) {
|
396 |
-
if ($outerKey == $key) {
|
397 |
-
return $outerValue;
|
398 |
-
}
|
399 |
-
}
|
400 |
-
return value($default);
|
401 |
-
}
|
402 |
-
/**
|
403 |
-
* Group an associative array by a field or using a callback.
|
404 |
-
*
|
405 |
-
* @param array|callable|string $groupBy
|
406 |
-
* @param bool $preserveKeys
|
407 |
-
* @return static
|
408 |
-
*/
|
409 |
-
public function groupBy($groupBy, $preserveKeys = \false)
|
410 |
-
{
|
411 |
-
return $this->passthru('groupBy', \func_get_args());
|
412 |
-
}
|
413 |
-
/**
|
414 |
-
* Key an associative array by a field or using a callback.
|
415 |
-
*
|
416 |
-
* @param callable|string $keyBy
|
417 |
-
* @return static
|
418 |
-
*/
|
419 |
-
public function keyBy($keyBy)
|
420 |
-
{
|
421 |
-
return new static(function () use($keyBy) {
|
422 |
-
$keyBy = $this->valueRetriever($keyBy);
|
423 |
-
foreach ($this as $key => $item) {
|
424 |
-
$resolvedKey = $keyBy($item, $key);
|
425 |
-
if (\is_object($resolvedKey)) {
|
426 |
-
$resolvedKey = (string) $resolvedKey;
|
427 |
-
}
|
428 |
-
(yield $resolvedKey => $item);
|
429 |
-
}
|
430 |
-
});
|
431 |
-
}
|
432 |
-
/**
|
433 |
-
* Determine if an item exists in the collection by key.
|
434 |
-
*
|
435 |
-
* @param mixed $key
|
436 |
-
* @return bool
|
437 |
-
*/
|
438 |
-
public function has($key)
|
439 |
-
{
|
440 |
-
$keys = \array_flip(\is_array($key) ? $key : \func_get_args());
|
441 |
-
$count = \count($keys);
|
442 |
-
foreach ($this as $key => $value) {
|
443 |
-
if (\array_key_exists($key, $keys) && --$count == 0) {
|
444 |
-
return \true;
|
445 |
-
}
|
446 |
-
}
|
447 |
-
return \false;
|
448 |
-
}
|
449 |
-
/**
|
450 |
-
* Determine if any of the keys exist in the collection.
|
451 |
-
*
|
452 |
-
* @param mixed $key
|
453 |
-
* @return bool
|
454 |
-
*/
|
455 |
-
public function hasAny($key)
|
456 |
-
{
|
457 |
-
$keys = \array_flip(\is_array($key) ? $key : \func_get_args());
|
458 |
-
foreach ($this as $key => $value) {
|
459 |
-
if (\array_key_exists($key, $keys)) {
|
460 |
-
return \true;
|
461 |
-
}
|
462 |
-
}
|
463 |
-
return \false;
|
464 |
-
}
|
465 |
-
/**
|
466 |
-
* Concatenate values of a given key as a string.
|
467 |
-
*
|
468 |
-
* @param string $value
|
469 |
-
* @param string|null $glue
|
470 |
-
* @return string
|
471 |
-
*/
|
472 |
-
public function implode($value, $glue = null)
|
473 |
-
{
|
474 |
-
return $this->collect()->implode(...\func_get_args());
|
475 |
-
}
|
476 |
-
/**
|
477 |
-
* Intersect the collection with the given items.
|
478 |
-
*
|
479 |
-
* @param mixed $items
|
480 |
-
* @return static
|
481 |
-
*/
|
482 |
-
public function intersect($items)
|
483 |
-
{
|
484 |
-
return $this->passthru('intersect', \func_get_args());
|
485 |
-
}
|
486 |
-
/**
|
487 |
-
* Intersect the collection with the given items by key.
|
488 |
-
*
|
489 |
-
* @param mixed $items
|
490 |
-
* @return static
|
491 |
-
*/
|
492 |
-
public function intersectByKeys($items)
|
493 |
-
{
|
494 |
-
return $this->passthru('intersectByKeys', \func_get_args());
|
495 |
-
}
|
496 |
-
/**
|
497 |
-
* Determine if the items are empty or not.
|
498 |
-
*
|
499 |
-
* @return bool
|
500 |
-
*/
|
501 |
-
public function isEmpty()
|
502 |
-
{
|
503 |
-
return !$this->getIterator()->valid();
|
504 |
-
}
|
505 |
-
/**
|
506 |
-
* Determine if the collection contains a single item.
|
507 |
-
*
|
508 |
-
* @return bool
|
509 |
-
*/
|
510 |
-
public function containsOneItem()
|
511 |
-
{
|
512 |
-
return $this->take(2)->count() === 1;
|
513 |
-
}
|
514 |
-
/**
|
515 |
-
* Join all items from the collection using a string. The final items can use a separate glue string.
|
516 |
-
*
|
517 |
-
* @param string $glue
|
518 |
-
* @param string $finalGlue
|
519 |
-
* @return string
|
520 |
-
*/
|
521 |
-
public function join($glue, $finalGlue = '')
|
522 |
-
{
|
523 |
-
return $this->collect()->join(...\func_get_args());
|
524 |
-
}
|
525 |
-
/**
|
526 |
-
* Get the keys of the collection items.
|
527 |
-
*
|
528 |
-
* @return static
|
529 |
-
*/
|
530 |
-
public function keys()
|
531 |
-
{
|
532 |
-
return new static(function () {
|
533 |
-
foreach ($this as $key => $value) {
|
534 |
-
(yield $key);
|
535 |
-
}
|
536 |
-
});
|
537 |
-
}
|
538 |
-
/**
|
539 |
-
* Get the last item from the collection.
|
540 |
-
*
|
541 |
-
* @param callable|null $callback
|
542 |
-
* @param mixed $default
|
543 |
-
* @return mixed
|
544 |
-
*/
|
545 |
-
public function last(callable $callback = null, $default = null)
|
546 |
-
{
|
547 |
-
$needle = $placeholder = new stdClass();
|
548 |
-
foreach ($this as $key => $value) {
|
549 |
-
if (\is_null($callback) || $callback($value, $key)) {
|
550 |
-
$needle = $value;
|
551 |
-
}
|
552 |
-
}
|
553 |
-
return $needle === $placeholder ? value($default) : $needle;
|
554 |
-
}
|
555 |
-
/**
|
556 |
-
* Get the values of a given key.
|
557 |
-
*
|
558 |
-
* @param string|array $value
|
559 |
-
* @param string|null $key
|
560 |
-
* @return static
|
561 |
-
*/
|
562 |
-
public function pluck($value, $key = null)
|
563 |
-
{
|
564 |
-
return new static(function () use($value, $key) {
|
565 |
-
[$value, $key] = $this->explodePluckParameters($value, $key);
|
566 |
-
foreach ($this as $item) {
|
567 |
-
$itemValue = data_get($item, $value);
|
568 |
-
if (\is_null($key)) {
|
569 |
-
(yield $itemValue);
|
570 |
-
} else {
|
571 |
-
$itemKey = data_get($item, $key);
|
572 |
-
if (\is_object($itemKey) && \method_exists($itemKey, '__toString')) {
|
573 |
-
$itemKey = (string) $itemKey;
|
574 |
-
}
|
575 |
-
(yield $itemKey => $itemValue);
|
576 |
-
}
|
577 |
-
}
|
578 |
-
});
|
579 |
-
}
|
580 |
-
/**
|
581 |
-
* Run a map over each of the items.
|
582 |
-
*
|
583 |
-
* @param callable $callback
|
584 |
-
* @return static
|
585 |
-
*/
|
586 |
-
public function map(callable $callback)
|
587 |
-
{
|
588 |
-
return new static(function () use($callback) {
|
589 |
-
foreach ($this as $key => $value) {
|
590 |
-
(yield $key => $callback($value, $key));
|
591 |
-
}
|
592 |
-
});
|
593 |
-
}
|
594 |
-
/**
|
595 |
-
* Run a dictionary map over the items.
|
596 |
-
*
|
597 |
-
* The callback should return an associative array with a single key/value pair.
|
598 |
-
*
|
599 |
-
* @param callable $callback
|
600 |
-
* @return static
|
601 |
-
*/
|
602 |
-
public function mapToDictionary(callable $callback)
|
603 |
-
{
|
604 |
-
return $this->passthru('mapToDictionary', \func_get_args());
|
605 |
-
}
|
606 |
-
/**
|
607 |
-
* Run an associative map over each of the items.
|
608 |
-
*
|
609 |
-
* The callback should return an associative array with a single key/value pair.
|
610 |
-
*
|
611 |
-
* @param callable $callback
|
612 |
-
* @return static
|
613 |
-
*/
|
614 |
-
public function mapWithKeys(callable $callback)
|
615 |
-
{
|
616 |
-
return new static(function () use($callback) {
|
617 |
-
foreach ($this as $key => $value) {
|
618 |
-
yield from $callback($value, $key);
|
619 |
-
}
|
620 |
-
});
|
621 |
-
}
|
622 |
-
/**
|
623 |
-
* Merge the collection with the given items.
|
624 |
-
*
|
625 |
-
* @param mixed $items
|
626 |
-
* @return static
|
627 |
-
*/
|
628 |
-
public function merge($items)
|
629 |
-
{
|
630 |
-
return $this->passthru('merge', \func_get_args());
|
631 |
-
}
|
632 |
-
/**
|
633 |
-
* Recursively merge the collection with the given items.
|
634 |
-
*
|
635 |
-
* @param mixed $items
|
636 |
-
* @return static
|
637 |
-
*/
|
638 |
-
public function mergeRecursive($items)
|
639 |
-
{
|
640 |
-
return $this->passthru('mergeRecursive', \func_get_args());
|
641 |
-
}
|
642 |
-
/**
|
643 |
-
* Create a collection by using this collection for keys and another for its values.
|
644 |
-
*
|
645 |
-
* @param mixed $values
|
646 |
-
* @return static
|
647 |
-
*/
|
648 |
-
public function combine($values)
|
649 |
-
{
|
650 |
-
return new static(function () use($values) {
|
651 |
-
$values = $this->makeIterator($values);
|
652 |
-
$errorMessage = 'Both parameters should have an equal number of elements';
|
653 |
-
foreach ($this as $key) {
|
654 |
-
if (!$values->valid()) {
|
655 |
-
\trigger_error($errorMessage, \E_USER_WARNING);
|
656 |
-
break;
|
657 |
-
}
|
658 |
-
(yield $key => $values->current());
|
659 |
-
$values->next();
|
660 |
-
}
|
661 |
-
if ($values->valid()) {
|
662 |
-
\trigger_error($errorMessage, \E_USER_WARNING);
|
663 |
-
}
|
664 |
-
});
|
665 |
-
}
|
666 |
-
/**
|
667 |
-
* Union the collection with the given items.
|
668 |
-
*
|
669 |
-
* @param mixed $items
|
670 |
-
* @return static
|
671 |
-
*/
|
672 |
-
public function union($items)
|
673 |
-
{
|
674 |
-
return $this->passthru('union', \func_get_args());
|
675 |
-
}
|
676 |
-
/**
|
677 |
-
* Create a new collection consisting of every n-th element.
|
678 |
-
*
|
679 |
-
* @param int $step
|
680 |
-
* @param int $offset
|
681 |
-
* @return static
|
682 |
-
*/
|
683 |
-
public function nth($step, $offset = 0)
|
684 |
-
{
|
685 |
-
return new static(function () use($step, $offset) {
|
686 |
-
$position = 0;
|
687 |
-
foreach ($this as $item) {
|
688 |
-
if ($position % $step === $offset) {
|
689 |
-
(yield $item);
|
690 |
-
}
|
691 |
-
$position++;
|
692 |
-
}
|
693 |
-
});
|
694 |
-
}
|
695 |
-
/**
|
696 |
-
* Get the items with the specified keys.
|
697 |
-
*
|
698 |
-
* @param mixed $keys
|
699 |
-
* @return static
|
700 |
-
*/
|
701 |
-
public function only($keys)
|
702 |
-
{
|
703 |
-
if ($keys instanceof Enumerable) {
|
704 |
-
$keys = $keys->all();
|
705 |
-
} elseif (!\is_null($keys)) {
|
706 |
-
$keys = \is_array($keys) ? $keys : \func_get_args();
|
707 |
-
}
|
708 |
-
return new static(function () use($keys) {
|
709 |
-
if (\is_null($keys)) {
|
710 |
-
yield from $this;
|
711 |
-
} else {
|
712 |
-
$keys = \array_flip($keys);
|
713 |
-
foreach ($this as $key => $value) {
|
714 |
-
if (\array_key_exists($key, $keys)) {
|
715 |
-
(yield $key => $value);
|
716 |
-
unset($keys[$key]);
|
717 |
-
if (empty($keys)) {
|
718 |
-
break;
|
719 |
-
}
|
720 |
-
}
|
721 |
-
}
|
722 |
-
}
|
723 |
-
});
|
724 |
-
}
|
725 |
-
/**
|
726 |
-
* Push all of the given items onto the collection.
|
727 |
-
*
|
728 |
-
* @param iterable $source
|
729 |
-
* @return static
|
730 |
-
*/
|
731 |
-
public function concat($source)
|
732 |
-
{
|
733 |
-
return (new static(function () use($source) {
|
734 |
-
yield from $this;
|
735 |
-
yield from $source;
|
736 |
-
}))->values();
|
737 |
-
}
|
738 |
-
/**
|
739 |
-
* Get one or a specified number of items randomly from the collection.
|
740 |
-
*
|
741 |
-
* @param int|null $number
|
742 |
-
* @return static|mixed
|
743 |
-
*
|
744 |
-
* @throws \InvalidArgumentException
|
745 |
-
*/
|
746 |
-
public function random($number = null)
|
747 |
-
{
|
748 |
-
$result = $this->collect()->random(...\func_get_args());
|
749 |
-
return \is_null($number) ? $result : new static($result);
|
750 |
-
}
|
751 |
-
/**
|
752 |
-
* Replace the collection items with the given items.
|
753 |
-
*
|
754 |
-
* @param mixed $items
|
755 |
-
* @return static
|
756 |
-
*/
|
757 |
-
public function replace($items)
|
758 |
-
{
|
759 |
-
return new static(function () use($items) {
|
760 |
-
$items = $this->getArrayableItems($items);
|
761 |
-
foreach ($this as $key => $value) {
|
762 |
-
if (\array_key_exists($key, $items)) {
|
763 |
-
(yield $key => $items[$key]);
|
764 |
-
unset($items[$key]);
|
765 |
-
} else {
|
766 |
-
(yield $key => $value);
|
767 |
-
}
|
768 |
-
}
|
769 |
-
foreach ($items as $key => $value) {
|
770 |
-
(yield $key => $value);
|
771 |
-
}
|
772 |
-
});
|
773 |
-
}
|
774 |
-
/**
|
775 |
-
* Recursively replace the collection items with the given items.
|
776 |
-
*
|
777 |
-
* @param mixed $items
|
778 |
-
* @return static
|
779 |
-
*/
|
780 |
-
public function replaceRecursive($items)
|
781 |
-
{
|
782 |
-
return $this->passthru('replaceRecursive', \func_get_args());
|
783 |
-
}
|
784 |
-
/**
|
785 |
-
* Reverse items order.
|
786 |
-
*
|
787 |
-
* @return static
|
788 |
-
*/
|
789 |
-
public function reverse()
|
790 |
-
{
|
791 |
-
return $this->passthru('reverse', \func_get_args());
|
792 |
-
}
|
793 |
-
/**
|
794 |
-
* Search the collection for a given value and return the corresponding key if successful.
|
795 |
-
*
|
796 |
-
* @param mixed $value
|
797 |
-
* @param bool $strict
|
798 |
-
* @return mixed
|
799 |
-
*/
|
800 |
-
public function search($value, $strict = \false)
|
801 |
-
{
|
802 |
-
$predicate = $this->useAsCallable($value) ? $value : function ($item) use($value, $strict) {
|
803 |
-
return $strict ? $item === $value : $item == $value;
|
804 |
-
};
|
805 |
-
foreach ($this as $key => $item) {
|
806 |
-
if ($predicate($item, $key)) {
|
807 |
-
return $key;
|
808 |
-
}
|
809 |
-
}
|
810 |
-
return \false;
|
811 |
-
}
|
812 |
-
/**
|
813 |
-
* Shuffle the items in the collection.
|
814 |
-
*
|
815 |
-
* @param int|null $seed
|
816 |
-
* @return static
|
817 |
-
*/
|
818 |
-
public function shuffle($seed = null)
|
819 |
-
{
|
820 |
-
return $this->passthru('shuffle', \func_get_args());
|
821 |
-
}
|
822 |
-
/**
|
823 |
-
* Create chunks representing a "sliding window" view of the items in the collection.
|
824 |
-
*
|
825 |
-
* @param int $size
|
826 |
-
* @param int $step
|
827 |
-
* @return static
|
828 |
-
*/
|
829 |
-
public function sliding($size = 2, $step = 1)
|
830 |
-
{
|
831 |
-
return new static(function () use($size, $step) {
|
832 |
-
$iterator = $this->getIterator();
|
833 |
-
$chunk = [];
|
834 |
-
while ($iterator->valid()) {
|
835 |
-
$chunk[$iterator->key()] = $iterator->current();
|
836 |
-
if (\count($chunk) == $size) {
|
837 |
-
(yield tap(new static($chunk), function () use(&$chunk, $step) {
|
838 |
-
$chunk = \array_slice($chunk, $step, null, \true);
|
839 |
-
}));
|
840 |
-
// If the $step between chunks is bigger than each chunk's $size
|
841 |
-
// we will skip the extra items (which should never be in any
|
842 |
-
// chunk) before we continue to the next chunk in the loop.
|
843 |
-
if ($step > $size) {
|
844 |
-
$skip = $step - $size;
|
845 |
-
for ($i = 0; $i < $skip && $iterator->valid(); $i++) {
|
846 |
-
$iterator->next();
|
847 |
-
}
|
848 |
-
}
|
849 |
-
}
|
850 |
-
$iterator->next();
|
851 |
-
}
|
852 |
-
});
|
853 |
-
}
|
854 |
-
/**
|
855 |
-
* Skip the first {$count} items.
|
856 |
-
*
|
857 |
-
* @param int $count
|
858 |
-
* @return static
|
859 |
-
*/
|
860 |
-
public function skip($count)
|
861 |
-
{
|
862 |
-
return new static(function () use($count) {
|
863 |
-
$iterator = $this->getIterator();
|
864 |
-
while ($iterator->valid() && $count--) {
|
865 |
-
$iterator->next();
|
866 |
-
}
|
867 |
-
while ($iterator->valid()) {
|
868 |
-
(yield $iterator->key() => $iterator->current());
|
869 |
-
$iterator->next();
|
870 |
-
}
|
871 |
-
});
|
872 |
-
}
|
873 |
-
/**
|
874 |
-
* Skip items in the collection until the given condition is met.
|
875 |
-
*
|
876 |
-
* @param mixed $value
|
877 |
-
* @return static
|
878 |
-
*/
|
879 |
-
public function skipUntil($value)
|
880 |
-
{
|
881 |
-
$callback = $this->useAsCallable($value) ? $value : $this->equality($value);
|
882 |
-
return $this->skipWhile($this->negate($callback));
|
883 |
-
}
|
884 |
-
/**
|
885 |
-
* Skip items in the collection while the given condition is met.
|
886 |
-
*
|
887 |
-
* @param mixed $value
|
888 |
-
* @return static
|
889 |
-
*/
|
890 |
-
public function skipWhile($value)
|
891 |
-
{
|
892 |
-
$callback = $this->useAsCallable($value) ? $value : $this->equality($value);
|
893 |
-
return new static(function () use($callback) {
|
894 |
-
$iterator = $this->getIterator();
|
895 |
-
while ($iterator->valid() && $callback($iterator->current(), $iterator->key())) {
|
896 |
-
$iterator->next();
|
897 |
-
}
|
898 |
-
while ($iterator->valid()) {
|
899 |
-
(yield $iterator->key() => $iterator->current());
|
900 |
-
$iterator->next();
|
901 |
-
}
|
902 |
-
});
|
903 |
-
}
|
904 |
-
/**
|
905 |
-
* Get a slice of items from the enumerable.
|
906 |
-
*
|
907 |
-
* @param int $offset
|
908 |
-
* @param int|null $length
|
909 |
-
* @return static
|
910 |
-
*/
|
911 |
-
public function slice($offset, $length = null)
|
912 |
-
{
|
913 |
-
if ($offset < 0 || $length < 0) {
|
914 |
-
return $this->passthru('slice', \func_get_args());
|
915 |
-
}
|
916 |
-
$instance = $this->skip($offset);
|
917 |
-
return \is_null($length) ? $instance : $instance->take($length);
|
918 |
-
}
|
919 |
-
/**
|
920 |
-
* Split a collection into a certain number of groups.
|
921 |
-
*
|
922 |
-
* @param int $numberOfGroups
|
923 |
-
* @return static
|
924 |
-
*/
|
925 |
-
public function split($numberOfGroups)
|
926 |
-
{
|
927 |
-
return $this->passthru('split', \func_get_args());
|
928 |
-
}
|
929 |
-
/**
|
930 |
-
* Get the first item in the collection, but only if exactly one item exists. Otherwise, throw an exception.
|
931 |
-
*
|
932 |
-
* @param mixed $key
|
933 |
-
* @param mixed $operator
|
934 |
-
* @param mixed $value
|
935 |
-
* @return mixed
|
936 |
-
*
|
937 |
-
* @throws \Illuminate\Support\ItemNotFoundException
|
938 |
-
* @throws \Illuminate\Support\MultipleItemsFoundException
|
939 |
-
*/
|
940 |
-
public function sole($key = null, $operator = null, $value = null)
|
941 |
-
{
|
942 |
-
$filter = \func_num_args() > 1 ? $this->operatorForWhere(...\func_get_args()) : $key;
|
943 |
-
return $this->when($filter)->filter($filter)->take(2)->collect()->sole();
|
944 |
-
}
|
945 |
-
/**
|
946 |
-
* Get the first item in the collection but throw an exception if no matching items exist.
|
947 |
-
*
|
948 |
-
* @param mixed $key
|
949 |
-
* @param mixed $operator
|
950 |
-
* @param mixed $value
|
951 |
-
* @return mixed
|
952 |
-
*
|
953 |
-
* @throws \Illuminate\Support\ItemNotFoundException
|
954 |
-
*/
|
955 |
-
public function firstOrFail($key = null, $operator = null, $value = null)
|
956 |
-
{
|
957 |
-
$filter = \func_num_args() > 1 ? $this->operatorForWhere(...\func_get_args()) : $key;
|
958 |
-
return $this->when($filter)->filter($filter)->take(1)->collect()->firstOrFail();
|
959 |
-
}
|
960 |
-
/**
|
961 |
-
* Chunk the collection into chunks of the given size.
|
962 |
-
*
|
963 |
-
* @param int $size
|
964 |
-
* @return static
|
965 |
-
*/
|
966 |
-
public function chunk($size)
|
967 |
-
{
|
968 |
-
if ($size <= 0) {
|
969 |
-
return static::empty();
|
970 |
-
}
|
971 |
-
return new static(function () use($size) {
|
972 |
-
$iterator = $this->getIterator();
|
973 |
-
while ($iterator->valid()) {
|
974 |
-
$chunk = [];
|
975 |
-
while (\true) {
|
976 |
-
$chunk[$iterator->key()] = $iterator->current();
|
977 |
-
if (\count($chunk) < $size) {
|
978 |
-
$iterator->next();
|
979 |
-
if (!$iterator->valid()) {
|
980 |
-
break;
|
981 |
-
}
|
982 |
-
} else {
|
983 |
-
break;
|
984 |
-
}
|
985 |
-
}
|
986 |
-
(yield new static($chunk));
|
987 |
-
$iterator->next();
|
988 |
-
}
|
989 |
-
});
|
990 |
-
}
|
991 |
-
/**
|
992 |
-
* Split a collection into a certain number of groups, and fill the first groups completely.
|
993 |
-
*
|
994 |
-
* @param int $numberOfGroups
|
995 |
-
* @return static
|
996 |
-
*/
|
997 |
-
public function splitIn($numberOfGroups)
|
998 |
-
{
|
999 |
-
return $this->chunk(\ceil($this->count() / $numberOfGroups));
|
1000 |
-
}
|
1001 |
-
/**
|
1002 |
-
* Chunk the collection into chunks with a callback.
|
1003 |
-
*
|
1004 |
-
* @param callable $callback
|
1005 |
-
* @return static
|
1006 |
-
*/
|
1007 |
-
public function chunkWhile(callable $callback)
|
1008 |
-
{
|
1009 |
-
return new static(function () use($callback) {
|
1010 |
-
$iterator = $this->getIterator();
|
1011 |
-
$chunk = new Collection();
|
1012 |
-
if ($iterator->valid()) {
|
1013 |
-
$chunk[$iterator->key()] = $iterator->current();
|
1014 |
-
$iterator->next();
|
1015 |
-
}
|
1016 |
-
while ($iterator->valid()) {
|
1017 |
-
if (!$callback($iterator->current(), $iterator->key(), $chunk)) {
|
1018 |
-
(yield new static($chunk));
|
1019 |
-
$chunk = new Collection();
|
1020 |
-
}
|
1021 |
-
$chunk[$iterator->key()] = $iterator->current();
|
1022 |
-
$iterator->next();
|
1023 |
-
}
|
1024 |
-
if ($chunk->isNotEmpty()) {
|
1025 |
-
(yield new static($chunk));
|
1026 |
-
}
|
1027 |
-
});
|
1028 |
-
}
|
1029 |
-
/**
|
1030 |
-
* Sort through each item with a callback.
|
1031 |
-
*
|
1032 |
-
* @param callable|null|int $callback
|
1033 |
-
* @return static
|
1034 |
-
*/
|
1035 |
-
public function sort($callback = null)
|
1036 |
-
{
|
1037 |
-
return $this->passthru('sort', \func_get_args());
|
1038 |
-
}
|
1039 |
-
/**
|
1040 |
-
* Sort items in descending order.
|
1041 |
-
*
|
1042 |
-
* @param int $options
|
1043 |
-
* @return static
|
1044 |
-
*/
|
1045 |
-
public function sortDesc($options = \SORT_REGULAR)
|
1046 |
-
{
|
1047 |
-
return $this->passthru('sortDesc', \func_get_args());
|
1048 |
-
}
|
1049 |
-
/**
|
1050 |
-
* Sort the collection using the given callback.
|
1051 |
-
*
|
1052 |
-
* @param callable|string $callback
|
1053 |
-
* @param int $options
|
1054 |
-
* @param bool $descending
|
1055 |
-
* @return static
|
1056 |
-
*/
|
1057 |
-
public function sortBy($callback, $options = \SORT_REGULAR, $descending = \false)
|
1058 |
-
{
|
1059 |
-
return $this->passthru('sortBy', \func_get_args());
|
1060 |
-
}
|
1061 |
-
/**
|
1062 |
-
* Sort the collection in descending order using the given callback.
|
1063 |
-
*
|
1064 |
-
* @param callable|string $callback
|
1065 |
-
* @param int $options
|
1066 |
-
* @return static
|
1067 |
-
*/
|
1068 |
-
public function sortByDesc($callback, $options = \SORT_REGULAR)
|
1069 |
-
{
|
1070 |
-
return $this->passthru('sortByDesc', \func_get_args());
|
1071 |
-
}
|
1072 |
-
/**
|
1073 |
-
* Sort the collection keys.
|
1074 |
-
*
|
1075 |
-
* @param int $options
|
1076 |
-
* @param bool $descending
|
1077 |
-
* @return static
|
1078 |
-
*/
|
1079 |
-
public function sortKeys($options = \SORT_REGULAR, $descending = \false)
|
1080 |
-
{
|
1081 |
-
return $this->passthru('sortKeys', \func_get_args());
|
1082 |
-
}
|
1083 |
-
/**
|
1084 |
-
* Sort the collection keys in descending order.
|
1085 |
-
*
|
1086 |
-
* @param int $options
|
1087 |
-
* @return static
|
1088 |
-
*/
|
1089 |
-
public function sortKeysDesc($options = \SORT_REGULAR)
|
1090 |
-
{
|
1091 |
-
return $this->passthru('sortKeysDesc', \func_get_args());
|
1092 |
-
}
|
1093 |
-
/**
|
1094 |
-
* Take the first or last {$limit} items.
|
1095 |
-
*
|
1096 |
-
* @param int $limit
|
1097 |
-
* @return static
|
1098 |
-
*/
|
1099 |
-
public function take($limit)
|
1100 |
-
{
|
1101 |
-
if ($limit < 0) {
|
1102 |
-
return $this->passthru('take', \func_get_args());
|
1103 |
-
}
|
1104 |
-
return new static(function () use($limit) {
|
1105 |
-
$iterator = $this->getIterator();
|
1106 |
-
while ($limit--) {
|
1107 |
-
if (!$iterator->valid()) {
|
1108 |
-
break;
|
1109 |
-
}
|
1110 |
-
(yield $iterator->key() => $iterator->current());
|
1111 |
-
if ($limit) {
|
1112 |
-
$iterator->next();
|
1113 |
-
}
|
1114 |
-
}
|
1115 |
-
});
|
1116 |
-
}
|
1117 |
-
/**
|
1118 |
-
* Take items in the collection until the given condition is met.
|
1119 |
-
*
|
1120 |
-
* @param mixed $value
|
1121 |
-
* @return static
|
1122 |
-
*/
|
1123 |
-
public function takeUntil($value)
|
1124 |
-
{
|
1125 |
-
$callback = $this->useAsCallable($value) ? $value : $this->equality($value);
|
1126 |
-
return new static(function () use($callback) {
|
1127 |
-
foreach ($this as $key => $item) {
|
1128 |
-
if ($callback($item, $key)) {
|
1129 |
-
break;
|
1130 |
-
}
|
1131 |
-
(yield $key => $item);
|
1132 |
-
}
|
1133 |
-
});
|
1134 |
-
}
|
1135 |
-
/**
|
1136 |
-
* Take items in the collection until a given point in time.
|
1137 |
-
*
|
1138 |
-
* @param \DateTimeInterface $timeout
|
1139 |
-
* @return static
|
1140 |
-
*/
|
1141 |
-
public function takeUntilTimeout(DateTimeInterface $timeout)
|
1142 |
-
{
|
1143 |
-
$timeout = $timeout->getTimestamp();
|
1144 |
-
return $this->takeWhile(function () use($timeout) {
|
1145 |
-
return $this->now() < $timeout;
|
1146 |
-
});
|
1147 |
-
}
|
1148 |
-
/**
|
1149 |
-
* Take items in the collection while the given condition is met.
|
1150 |
-
*
|
1151 |
-
* @param mixed $value
|
1152 |
-
* @return static
|
1153 |
-
*/
|
1154 |
-
public function takeWhile($value)
|
1155 |
-
{
|
1156 |
-
$callback = $this->useAsCallable($value) ? $value : $this->equality($value);
|
1157 |
-
return $this->takeUntil(function ($item, $key) use($callback) {
|
1158 |
-
return !$callback($item, $key);
|
1159 |
-
});
|
1160 |
-
}
|
1161 |
-
/**
|
1162 |
-
* Pass each item in the collection to the given callback, lazily.
|
1163 |
-
*
|
1164 |
-
* @param callable $callback
|
1165 |
-
* @return static
|
1166 |
-
*/
|
1167 |
-
public function tapEach(callable $callback)
|
1168 |
-
{
|
1169 |
-
return new static(function () use($callback) {
|
1170 |
-
foreach ($this as $key => $value) {
|
1171 |
-
$callback($value, $key);
|
1172 |
-
(yield $key => $value);
|
1173 |
-
}
|
1174 |
-
});
|
1175 |
-
}
|
1176 |
-
/**
|
1177 |
-
* Convert a flatten "dot" notation array into an expanded array.
|
1178 |
-
*
|
1179 |
-
* @return static
|
1180 |
-
*/
|
1181 |
-
public function undot()
|
1182 |
-
{
|
1183 |
-
return $this->passthru('undot', []);
|
1184 |
-
}
|
1185 |
-
/**
|
1186 |
-
* Return only unique items from the collection array.
|
1187 |
-
*
|
1188 |
-
* @param string|callable|null $key
|
1189 |
-
* @param bool $strict
|
1190 |
-
* @return static
|
1191 |
-
*/
|
1192 |
-
public function unique($key = null, $strict = \false)
|
1193 |
-
{
|
1194 |
-
$callback = $this->valueRetriever($key);
|
1195 |
-
return new static(function () use($callback, $strict) {
|
1196 |
-
$exists = [];
|
1197 |
-
foreach ($this as $key => $item) {
|
1198 |
-
if (!\in_array($id = $callback($item, $key), $exists, $strict)) {
|
1199 |
-
(yield $key => $item);
|
1200 |
-
$exists[] = $id;
|
1201 |
-
}
|
1202 |
-
}
|
1203 |
-
});
|
1204 |
-
}
|
1205 |
-
/**
|
1206 |
-
* Reset the keys on the underlying array.
|
1207 |
-
*
|
1208 |
-
* @return static
|
1209 |
-
*/
|
1210 |
-
public function values()
|
1211 |
-
{
|
1212 |
-
return new static(function () {
|
1213 |
-
foreach ($this as $item) {
|
1214 |
-
(yield $item);
|
1215 |
-
}
|
1216 |
-
});
|
1217 |
-
}
|
1218 |
-
/**
|
1219 |
-
* Zip the collection together with one or more arrays.
|
1220 |
-
*
|
1221 |
-
* e.g. new LazyCollection([1, 2, 3])->zip([4, 5, 6]);
|
1222 |
-
* => [[1, 4], [2, 5], [3, 6]]
|
1223 |
-
*
|
1224 |
-
* @param mixed ...$items
|
1225 |
-
* @return static
|
1226 |
-
*/
|
1227 |
-
public function zip($items)
|
1228 |
-
{
|
1229 |
-
$iterables = \func_get_args();
|
1230 |
-
return new static(function () use($iterables) {
|
1231 |
-
$iterators = Collection::make($iterables)->map(function ($iterable) {
|
1232 |
-
return $this->makeIterator($iterable);
|
1233 |
-
})->prepend($this->getIterator());
|
1234 |
-
while ($iterators->contains->valid()) {
|
1235 |
-
(yield new static($iterators->map->current()));
|
1236 |
-
$iterators->each->next();
|
1237 |
-
}
|
1238 |
-
});
|
1239 |
-
}
|
1240 |
-
/**
|
1241 |
-
* Pad collection to the specified length with a value.
|
1242 |
-
*
|
1243 |
-
* @param int $size
|
1244 |
-
* @param mixed $value
|
1245 |
-
* @return static
|
1246 |
-
*/
|
1247 |
-
public function pad($size, $value)
|
1248 |
-
{
|
1249 |
-
if ($size < 0) {
|
1250 |
-
return $this->passthru('pad', \func_get_args());
|
1251 |
-
}
|
1252 |
-
return new static(function () use($size, $value) {
|
1253 |
-
$yielded = 0;
|
1254 |
-
foreach ($this as $index => $item) {
|
1255 |
-
(yield $index => $item);
|
1256 |
-
$yielded++;
|
1257 |
-
}
|
1258 |
-
while ($yielded++ < $size) {
|
1259 |
-
(yield $value);
|
1260 |
-
}
|
1261 |
-
});
|
1262 |
-
}
|
1263 |
-
/**
|
1264 |
-
* Get the values iterator.
|
1265 |
-
*
|
1266 |
-
* @return \Traversable
|
1267 |
-
*/
|
1268 |
-
#[\ReturnTypeWillChange]
|
1269 |
-
public function getIterator()
|
1270 |
-
{
|
1271 |
-
return $this->makeIterator($this->source);
|
1272 |
-
}
|
1273 |
-
/**
|
1274 |
-
* Count the number of items in the collection.
|
1275 |
-
*
|
1276 |
-
* @return int
|
1277 |
-
*/
|
1278 |
-
#[\ReturnTypeWillChange]
|
1279 |
-
public function count()
|
1280 |
-
{
|
1281 |
-
if (\is_array($this->source)) {
|
1282 |
-
return \count($this->source);
|
1283 |
-
}
|
1284 |
-
return \iterator_count($this->getIterator());
|
1285 |
-
}
|
1286 |
-
/**
|
1287 |
-
* Make an iterator from the given source.
|
1288 |
-
*
|
1289 |
-
* @param mixed $source
|
1290 |
-
* @return \Traversable
|
1291 |
-
*/
|
1292 |
-
protected function makeIterator($source)
|
1293 |
-
{
|
1294 |
-
if ($source instanceof IteratorAggregate) {
|
1295 |
-
return $source->getIterator();
|
1296 |
-
}
|
1297 |
-
if (\is_array($source)) {
|
1298 |
-
return new ArrayIterator($source);
|
1299 |
-
}
|
1300 |
-
return $source();
|
1301 |
-
}
|
1302 |
-
/**
|
1303 |
-
* Explode the "value" and "key" arguments passed to "pluck".
|
1304 |
-
*
|
1305 |
-
* @param string|array $value
|
1306 |
-
* @param string|array|null $key
|
1307 |
-
* @return array
|
1308 |
-
*/
|
1309 |
-
protected function explodePluckParameters($value, $key)
|
1310 |
-
{
|
1311 |
-
$value = \is_string($value) ? \explode('.', $value) : $value;
|
1312 |
-
$key = \is_null($key) || \is_array($key) ? $key : \explode('.', $key);
|
1313 |
-
return [$value, $key];
|
1314 |
-
}
|
1315 |
-
/**
|
1316 |
-
* Pass this lazy collection through a method on the collection class.
|
1317 |
-
*
|
1318 |
-
* @param string $method
|
1319 |
-
* @param array $params
|
1320 |
-
* @return static
|
1321 |
-
*/
|
1322 |
-
protected function passthru($method, array $params)
|
1323 |
-
{
|
1324 |
-
return new static(function () use($method, $params) {
|
1325 |
-
yield from $this->collect()->{$method}(...$params);
|
1326 |
-
});
|
1327 |
-
}
|
1328 |
-
/**
|
1329 |
-
* Get the current time.
|
1330 |
-
*
|
1331 |
-
* @return int
|
1332 |
-
*/
|
1333 |
-
protected function now()
|
1334 |
-
{
|
1335 |
-
return \time();
|
1336 |
-
}
|
1337 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/collections/MultipleItemsFoundException.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Support;
|
4 |
-
|
5 |
-
use RuntimeException;
|
6 |
-
class MultipleItemsFoundException extends RuntimeException
|
7 |
-
{
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/collections/Traits/EnumeratesValues.php
DELETED
@@ -1,946 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Support\Traits;
|
4 |
-
|
5 |
-
use CachingIterator;
|
6 |
-
use Closure;
|
7 |
-
use Exception;
|
8 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Support\Arrayable;
|
9 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Support\Jsonable;
|
10 |
-
use Data443\gdpr\framework\Illuminate\Support\Arr;
|
11 |
-
use Data443\gdpr\framework\Illuminate\Support\Collection;
|
12 |
-
use Data443\gdpr\framework\Illuminate\Support\Enumerable;
|
13 |
-
use Data443\gdpr\framework\Illuminate\Support\HigherOrderCollectionProxy;
|
14 |
-
use Data443\gdpr\framework\Illuminate\Support\HigherOrderWhenProxy;
|
15 |
-
use JsonSerializable;
|
16 |
-
use Data443\gdpr\framework\Symfony\Component\VarDumper\VarDumper;
|
17 |
-
use Traversable;
|
18 |
-
use UnexpectedValueException;
|
19 |
-
/**
|
20 |
-
* @property-read HigherOrderCollectionProxy $average
|
21 |
-
* @property-read HigherOrderCollectionProxy $avg
|
22 |
-
* @property-read HigherOrderCollectionProxy $contains
|
23 |
-
* @property-read HigherOrderCollectionProxy $each
|
24 |
-
* @property-read HigherOrderCollectionProxy $every
|
25 |
-
* @property-read HigherOrderCollectionProxy $filter
|
26 |
-
* @property-read HigherOrderCollectionProxy $first
|
27 |
-
* @property-read HigherOrderCollectionProxy $flatMap
|
28 |
-
* @property-read HigherOrderCollectionProxy $groupBy
|
29 |
-
* @property-read HigherOrderCollectionProxy $keyBy
|
30 |
-
* @property-read HigherOrderCollectionProxy $map
|
31 |
-
* @property-read HigherOrderCollectionProxy $max
|
32 |
-
* @property-read HigherOrderCollectionProxy $min
|
33 |
-
* @property-read HigherOrderCollectionProxy $partition
|
34 |
-
* @property-read HigherOrderCollectionProxy $reject
|
35 |
-
* @property-read HigherOrderCollectionProxy $some
|
36 |
-
* @property-read HigherOrderCollectionProxy $sortBy
|
37 |
-
* @property-read HigherOrderCollectionProxy $sortByDesc
|
38 |
-
* @property-read HigherOrderCollectionProxy $skipUntil
|
39 |
-
* @property-read HigherOrderCollectionProxy $skipWhile
|
40 |
-
* @property-read HigherOrderCollectionProxy $sum
|
41 |
-
* @property-read HigherOrderCollectionProxy $takeUntil
|
42 |
-
* @property-read HigherOrderCollectionProxy $takeWhile
|
43 |
-
* @property-read HigherOrderCollectionProxy $unique
|
44 |
-
* @property-read HigherOrderCollectionProxy $until
|
45 |
-
*/
|
46 |
-
trait EnumeratesValues
|
47 |
-
{
|
48 |
-
/**
|
49 |
-
* Indicates that the object's string representation should be escaped when __toString is invoked.
|
50 |
-
*
|
51 |
-
* @var bool
|
52 |
-
*/
|
53 |
-
protected $escapeWhenCastingToString = \false;
|
54 |
-
/**
|
55 |
-
* The methods that can be proxied.
|
56 |
-
*
|
57 |
-
* @var string[]
|
58 |
-
*/
|
59 |
-
protected static $proxies = ['average', 'avg', 'contains', 'each', 'every', 'filter', 'first', 'flatMap', 'groupBy', 'keyBy', 'map', 'max', 'min', 'partition', 'reject', 'skipUntil', 'skipWhile', 'some', 'sortBy', 'sortByDesc', 'sum', 'takeUntil', 'takeWhile', 'unique', 'until'];
|
60 |
-
/**
|
61 |
-
* Create a new collection instance if the value isn't one already.
|
62 |
-
*
|
63 |
-
* @param mixed $items
|
64 |
-
* @return static
|
65 |
-
*/
|
66 |
-
public static function make($items = [])
|
67 |
-
{
|
68 |
-
return new static($items);
|
69 |
-
}
|
70 |
-
/**
|
71 |
-
* Wrap the given value in a collection if applicable.
|
72 |
-
*
|
73 |
-
* @param mixed $value
|
74 |
-
* @return static
|
75 |
-
*/
|
76 |
-
public static function wrap($value)
|
77 |
-
{
|
78 |
-
return $value instanceof Enumerable ? new static($value) : new static(Arr::wrap($value));
|
79 |
-
}
|
80 |
-
/**
|
81 |
-
* Get the underlying items from the given collection if applicable.
|
82 |
-
*
|
83 |
-
* @param array|static $value
|
84 |
-
* @return array
|
85 |
-
*/
|
86 |
-
public static function unwrap($value)
|
87 |
-
{
|
88 |
-
return $value instanceof Enumerable ? $value->all() : $value;
|
89 |
-
}
|
90 |
-
/**
|
91 |
-
* Create a new instance with no items.
|
92 |
-
*
|
93 |
-
* @return static
|
94 |
-
*/
|
95 |
-
public static function empty()
|
96 |
-
{
|
97 |
-
return new static([]);
|
98 |
-
}
|
99 |
-
/**
|
100 |
-
* Create a new collection by invoking the callback a given amount of times.
|
101 |
-
*
|
102 |
-
* @param int $number
|
103 |
-
* @param callable|null $callback
|
104 |
-
* @return static
|
105 |
-
*/
|
106 |
-
public static function times($number, callable $callback = null)
|
107 |
-
{
|
108 |
-
if ($number < 1) {
|
109 |
-
return new static();
|
110 |
-
}
|
111 |
-
return static::range(1, $number)->when($callback)->map($callback);
|
112 |
-
}
|
113 |
-
/**
|
114 |
-
* Alias for the "avg" method.
|
115 |
-
*
|
116 |
-
* @param callable|string|null $callback
|
117 |
-
* @return mixed
|
118 |
-
*/
|
119 |
-
public function average($callback = null)
|
120 |
-
{
|
121 |
-
return $this->avg($callback);
|
122 |
-
}
|
123 |
-
/**
|
124 |
-
* Alias for the "contains" method.
|
125 |
-
*
|
126 |
-
* @param mixed $key
|
127 |
-
* @param mixed $operator
|
128 |
-
* @param mixed $value
|
129 |
-
* @return bool
|
130 |
-
*/
|
131 |
-
public function some($key, $operator = null, $value = null)
|
132 |
-
{
|
133 |
-
return $this->contains(...\func_get_args());
|
134 |
-
}
|
135 |
-
/**
|
136 |
-
* Determine if an item exists, using strict comparison.
|
137 |
-
*
|
138 |
-
* @param mixed $key
|
139 |
-
* @param mixed $value
|
140 |
-
* @return bool
|
141 |
-
*/
|
142 |
-
public function containsStrict($key, $value = null)
|
143 |
-
{
|
144 |
-
if (\func_num_args() === 2) {
|
145 |
-
return $this->contains(function ($item) use($key, $value) {
|
146 |
-
return data_get($item, $key) === $value;
|
147 |
-
});
|
148 |
-
}
|
149 |
-
if ($this->useAsCallable($key)) {
|
150 |
-
return !\is_null($this->first($key));
|
151 |
-
}
|
152 |
-
foreach ($this as $item) {
|
153 |
-
if ($item === $key) {
|
154 |
-
return \true;
|
155 |
-
}
|
156 |
-
}
|
157 |
-
return \false;
|
158 |
-
}
|
159 |
-
/**
|
160 |
-
* Dump the items and end the script.
|
161 |
-
*
|
162 |
-
* @param mixed ...$args
|
163 |
-
* @return void
|
164 |
-
*/
|
165 |
-
public function dd(...$args)
|
166 |
-
{
|
167 |
-
$this->dump(...$args);
|
168 |
-
exit(1);
|
169 |
-
}
|
170 |
-
/**
|
171 |
-
* Dump the items.
|
172 |
-
*
|
173 |
-
* @return $this
|
174 |
-
*/
|
175 |
-
public function dump()
|
176 |
-
{
|
177 |
-
(new Collection(\func_get_args()))->push($this->all())->each(function ($item) {
|
178 |
-
VarDumper::dump($item);
|
179 |
-
});
|
180 |
-
return $this;
|
181 |
-
}
|
182 |
-
/**
|
183 |
-
* Execute a callback over each item.
|
184 |
-
*
|
185 |
-
* @param callable $callback
|
186 |
-
* @return $this
|
187 |
-
*/
|
188 |
-
public function each(callable $callback)
|
189 |
-
{
|
190 |
-
foreach ($this as $key => $item) {
|
191 |
-
if ($callback($item, $key) === \false) {
|
192 |
-
break;
|
193 |
-
}
|
194 |
-
}
|
195 |
-
return $this;
|
196 |
-
}
|
197 |
-
/**
|
198 |
-
* Execute a callback over each nested chunk of items.
|
199 |
-
*
|
200 |
-
* @param callable $callback
|
201 |
-
* @return static
|
202 |
-
*/
|
203 |
-
public function eachSpread(callable $callback)
|
204 |
-
{
|
205 |
-
return $this->each(function ($chunk, $key) use($callback) {
|
206 |
-
$chunk[] = $key;
|
207 |
-
return $callback(...$chunk);
|
208 |
-
});
|
209 |
-
}
|
210 |
-
/**
|
211 |
-
* Determine if all items pass the given truth test.
|
212 |
-
*
|
213 |
-
* @param string|callable $key
|
214 |
-
* @param mixed $operator
|
215 |
-
* @param mixed $value
|
216 |
-
* @return bool
|
217 |
-
*/
|
218 |
-
public function every($key, $operator = null, $value = null)
|
219 |
-
{
|
220 |
-
if (\func_num_args() === 1) {
|
221 |
-
$callback = $this->valueRetriever($key);
|
222 |
-
foreach ($this as $k => $v) {
|
223 |
-
if (!$callback($v, $k)) {
|
224 |
-
return \false;
|
225 |
-
}
|
226 |
-
}
|
227 |
-
return \true;
|
228 |
-
}
|
229 |
-
return $this->every($this->operatorForWhere(...\func_get_args()));
|
230 |
-
}
|
231 |
-
/**
|
232 |
-
* Get the first item by the given key value pair.
|
233 |
-
*
|
234 |
-
* @param string $key
|
235 |
-
* @param mixed $operator
|
236 |
-
* @param mixed $value
|
237 |
-
* @return mixed
|
238 |
-
*/
|
239 |
-
public function firstWhere($key, $operator = null, $value = null)
|
240 |
-
{
|
241 |
-
return $this->first($this->operatorForWhere(...\func_get_args()));
|
242 |
-
}
|
243 |
-
/**
|
244 |
-
* Determine if the collection is not empty.
|
245 |
-
*
|
246 |
-
* @return bool
|
247 |
-
*/
|
248 |
-
public function isNotEmpty()
|
249 |
-
{
|
250 |
-
return !$this->isEmpty();
|
251 |
-
}
|
252 |
-
/**
|
253 |
-
* Run a map over each nested chunk of items.
|
254 |
-
*
|
255 |
-
* @param callable $callback
|
256 |
-
* @return static
|
257 |
-
*/
|
258 |
-
public function mapSpread(callable $callback)
|
259 |
-
{
|
260 |
-
return $this->map(function ($chunk, $key) use($callback) {
|
261 |
-
$chunk[] = $key;
|
262 |
-
return $callback(...$chunk);
|
263 |
-
});
|
264 |
-
}
|
265 |
-
/**
|
266 |
-
* Run a grouping map over the items.
|
267 |
-
*
|
268 |
-
* The callback should return an associative array with a single key/value pair.
|
269 |
-
*
|
270 |
-
* @param callable $callback
|
271 |
-
* @return static
|
272 |
-
*/
|
273 |
-
public function mapToGroups(callable $callback)
|
274 |
-
{
|
275 |
-
$groups = $this->mapToDictionary($callback);
|
276 |
-
return $groups->map([$this, 'make']);
|
277 |
-
}
|
278 |
-
/**
|
279 |
-
* Map a collection and flatten the result by a single level.
|
280 |
-
*
|
281 |
-
* @param callable $callback
|
282 |
-
* @return static
|
283 |
-
*/
|
284 |
-
public function flatMap(callable $callback)
|
285 |
-
{
|
286 |
-
return $this->map($callback)->collapse();
|
287 |
-
}
|
288 |
-
/**
|
289 |
-
* Map the values into a new class.
|
290 |
-
*
|
291 |
-
* @param string $class
|
292 |
-
* @return static
|
293 |
-
*/
|
294 |
-
public function mapInto($class)
|
295 |
-
{
|
296 |
-
return $this->map(function ($value, $key) use($class) {
|
297 |
-
return new $class($value, $key);
|
298 |
-
});
|
299 |
-
}
|
300 |
-
/**
|
301 |
-
* Get the min value of a given key.
|
302 |
-
*
|
303 |
-
* @param callable|string|null $callback
|
304 |
-
* @return mixed
|
305 |
-
*/
|
306 |
-
public function min($callback = null)
|
307 |
-
{
|
308 |
-
$callback = $this->valueRetriever($callback);
|
309 |
-
return $this->map(function ($value) use($callback) {
|
310 |
-
return $callback($value);
|
311 |
-
})->filter(function ($value) {
|
312 |
-
return !\is_null($value);
|
313 |
-
})->reduce(function ($result, $value) {
|
314 |
-
return \is_null($result) || $value < $result ? $value : $result;
|
315 |
-
});
|
316 |
-
}
|
317 |
-
/**
|
318 |
-
* Get the max value of a given key.
|
319 |
-
*
|
320 |
-
* @param callable|string|null $callback
|
321 |
-
* @return mixed
|
322 |
-
*/
|
323 |
-
public function max($callback = null)
|
324 |
-
{
|
325 |
-
$callback = $this->valueRetriever($callback);
|
326 |
-
return $this->filter(function ($value) {
|
327 |
-
return !\is_null($value);
|
328 |
-
})->reduce(function ($result, $item) use($callback) {
|
329 |
-
$value = $callback($item);
|
330 |
-
return \is_null($result) || $value > $result ? $value : $result;
|
331 |
-
});
|
332 |
-
}
|
333 |
-
/**
|
334 |
-
* "Paginate" the collection by slicing it into a smaller collection.
|
335 |
-
*
|
336 |
-
* @param int $page
|
337 |
-
* @param int $perPage
|
338 |
-
* @return static
|
339 |
-
*/
|
340 |
-
public function forPage($page, $perPage)
|
341 |
-
{
|
342 |
-
$offset = \max(0, ($page - 1) * $perPage);
|
343 |
-
return $this->slice($offset, $perPage);
|
344 |
-
}
|
345 |
-
/**
|
346 |
-
* Partition the collection into two arrays using the given callback or key.
|
347 |
-
*
|
348 |
-
* @param callable|string $key
|
349 |
-
* @param mixed $operator
|
350 |
-
* @param mixed $value
|
351 |
-
* @return static
|
352 |
-
*/
|
353 |
-
public function partition($key, $operator = null, $value = null)
|
354 |
-
{
|
355 |
-
$passed = [];
|
356 |
-
$failed = [];
|
357 |
-
$callback = \func_num_args() === 1 ? $this->valueRetriever($key) : $this->operatorForWhere(...\func_get_args());
|
358 |
-
foreach ($this as $key => $item) {
|
359 |
-
if ($callback($item, $key)) {
|
360 |
-
$passed[$key] = $item;
|
361 |
-
} else {
|
362 |
-
$failed[$key] = $item;
|
363 |
-
}
|
364 |
-
}
|
365 |
-
return new static([new static($passed), new static($failed)]);
|
366 |
-
}
|
367 |
-
/**
|
368 |
-
* Get the sum of the given values.
|
369 |
-
*
|
370 |
-
* @param callable|string|null $callback
|
371 |
-
* @return mixed
|
372 |
-
*/
|
373 |
-
public function sum($callback = null)
|
374 |
-
{
|
375 |
-
$callback = \is_null($callback) ? $this->identity() : $this->valueRetriever($callback);
|
376 |
-
return $this->reduce(function ($result, $item) use($callback) {
|
377 |
-
return $result + $callback($item);
|
378 |
-
}, 0);
|
379 |
-
}
|
380 |
-
/**
|
381 |
-
* Apply the callback if the value is truthy.
|
382 |
-
*
|
383 |
-
* @param bool|mixed $value
|
384 |
-
* @param callable|null $callback
|
385 |
-
* @param callable|null $default
|
386 |
-
* @return static|mixed
|
387 |
-
*/
|
388 |
-
public function when($value, callable $callback = null, callable $default = null)
|
389 |
-
{
|
390 |
-
if (!$callback) {
|
391 |
-
return new HigherOrderWhenProxy($this, $value);
|
392 |
-
}
|
393 |
-
if ($value) {
|
394 |
-
return $callback($this, $value);
|
395 |
-
} elseif ($default) {
|
396 |
-
return $default($this, $value);
|
397 |
-
}
|
398 |
-
return $this;
|
399 |
-
}
|
400 |
-
/**
|
401 |
-
* Apply the callback if the collection is empty.
|
402 |
-
*
|
403 |
-
* @param callable $callback
|
404 |
-
* @param callable|null $default
|
405 |
-
* @return static|mixed
|
406 |
-
*/
|
407 |
-
public function whenEmpty(callable $callback, callable $default = null)
|
408 |
-
{
|
409 |
-
return $this->when($this->isEmpty(), $callback, $default);
|
410 |
-
}
|
411 |
-
/**
|
412 |
-
* Apply the callback if the collection is not empty.
|
413 |
-
*
|
414 |
-
* @param callable $callback
|
415 |
-
* @param callable|null $default
|
416 |
-
* @return static|mixed
|
417 |
-
*/
|
418 |
-
public function whenNotEmpty(callable $callback, callable $default = null)
|
419 |
-
{
|
420 |
-
return $this->when($this->isNotEmpty(), $callback, $default);
|
421 |
-
}
|
422 |
-
/**
|
423 |
-
* Apply the callback if the value is falsy.
|
424 |
-
*
|
425 |
-
* @param bool $value
|
426 |
-
* @param callable $callback
|
427 |
-
* @param callable|null $default
|
428 |
-
* @return static|mixed
|
429 |
-
*/
|
430 |
-
public function unless($value, callable $callback, callable $default = null)
|
431 |
-
{
|
432 |
-
return $this->when(!$value, $callback, $default);
|
433 |
-
}
|
434 |
-
/**
|
435 |
-
* Apply the callback unless the collection is empty.
|
436 |
-
*
|
437 |
-
* @param callable $callback
|
438 |
-
* @param callable|null $default
|
439 |
-
* @return static|mixed
|
440 |
-
*/
|
441 |
-
public function unlessEmpty(callable $callback, callable $default = null)
|
442 |
-
{
|
443 |
-
return $this->whenNotEmpty($callback, $default);
|
444 |
-
}
|
445 |
-
/**
|
446 |
-
* Apply the callback unless the collection is not empty.
|
447 |
-
*
|
448 |
-
* @param callable $callback
|
449 |
-
* @param callable|null $default
|
450 |
-
* @return static|mixed
|
451 |
-
*/
|
452 |
-
public function unlessNotEmpty(callable $callback, callable $default = null)
|
453 |
-
{
|
454 |
-
return $this->whenEmpty($callback, $default);
|
455 |
-
}
|
456 |
-
/**
|
457 |
-
* Filter items by the given key value pair.
|
458 |
-
*
|
459 |
-
* @param string $key
|
460 |
-
* @param mixed $operator
|
461 |
-
* @param mixed $value
|
462 |
-
* @return static
|
463 |
-
*/
|
464 |
-
public function where($key, $operator = null, $value = null)
|
465 |
-
{
|
466 |
-
return $this->filter($this->operatorForWhere(...\func_get_args()));
|
467 |
-
}
|
468 |
-
/**
|
469 |
-
* Filter items where the value for the given key is null.
|
470 |
-
*
|
471 |
-
* @param string|null $key
|
472 |
-
* @return static
|
473 |
-
*/
|
474 |
-
public function whereNull($key = null)
|
475 |
-
{
|
476 |
-
return $this->whereStrict($key, null);
|
477 |
-
}
|
478 |
-
/**
|
479 |
-
* Filter items where the value for the given key is not null.
|
480 |
-
*
|
481 |
-
* @param string|null $key
|
482 |
-
* @return static
|
483 |
-
*/
|
484 |
-
public function whereNotNull($key = null)
|
485 |
-
{
|
486 |
-
return $this->where($key, '!==', null);
|
487 |
-
}
|
488 |
-
/**
|
489 |
-
* Filter items by the given key value pair using strict comparison.
|
490 |
-
*
|
491 |
-
* @param string $key
|
492 |
-
* @param mixed $value
|
493 |
-
* @return static
|
494 |
-
*/
|
495 |
-
public function whereStrict($key, $value)
|
496 |
-
{
|
497 |
-
return $this->where($key, '===', $value);
|
498 |
-
}
|
499 |
-
/**
|
500 |
-
* Filter items by the given key value pair.
|
501 |
-
*
|
502 |
-
* @param string $key
|
503 |
-
* @param mixed $values
|
504 |
-
* @param bool $strict
|
505 |
-
* @return static
|
506 |
-
*/
|
507 |
-
public function whereIn($key, $values, $strict = \false)
|
508 |
-
{
|
509 |
-
$values = $this->getArrayableItems($values);
|
510 |
-
return $this->filter(function ($item) use($key, $values, $strict) {
|
511 |
-
return \in_array(data_get($item, $key), $values, $strict);
|
512 |
-
});
|
513 |
-
}
|
514 |
-
/**
|
515 |
-
* Filter items by the given key value pair using strict comparison.
|
516 |
-
*
|
517 |
-
* @param string $key
|
518 |
-
* @param mixed $values
|
519 |
-
* @return static
|
520 |
-
*/
|
521 |
-
public function whereInStrict($key, $values)
|
522 |
-
{
|
523 |
-
return $this->whereIn($key, $values, \true);
|
524 |
-
}
|
525 |
-
/**
|
526 |
-
* Filter items such that the value of the given key is between the given values.
|
527 |
-
*
|
528 |
-
* @param string $key
|
529 |
-
* @param array $values
|
530 |
-
* @return static
|
531 |
-
*/
|
532 |
-
public function whereBetween($key, $values)
|
533 |
-
{
|
534 |
-
return $this->where($key, '>=', \reset($values))->where($key, '<=', \end($values));
|
535 |
-
}
|
536 |
-
/**
|
537 |
-
* Filter items such that the value of the given key is not between the given values.
|
538 |
-
*
|
539 |
-
* @param string $key
|
540 |
-
* @param array $values
|
541 |
-
* @return static
|
542 |
-
*/
|
543 |
-
public function whereNotBetween($key, $values)
|
544 |
-
{
|
545 |
-
return $this->filter(function ($item) use($key, $values) {
|
546 |
-
return data_get($item, $key) < \reset($values) || data_get($item, $key) > \end($values);
|
547 |
-
});
|
548 |
-
}
|
549 |
-
/**
|
550 |
-
* Filter items by the given key value pair.
|
551 |
-
*
|
552 |
-
* @param string $key
|
553 |
-
* @param mixed $values
|
554 |
-
* @param bool $strict
|
555 |
-
* @return static
|
556 |
-
*/
|
557 |
-
public function whereNotIn($key, $values, $strict = \false)
|
558 |
-
{
|
559 |
-
$values = $this->getArrayableItems($values);
|
560 |
-
return $this->reject(function ($item) use($key, $values, $strict) {
|
561 |
-
return \in_array(data_get($item, $key), $values, $strict);
|
562 |
-
});
|
563 |
-
}
|
564 |
-
/**
|
565 |
-
* Filter items by the given key value pair using strict comparison.
|
566 |
-
*
|
567 |
-
* @param string $key
|
568 |
-
* @param mixed $values
|
569 |
-
* @return static
|
570 |
-
*/
|
571 |
-
public function whereNotInStrict($key, $values)
|
572 |
-
{
|
573 |
-
return $this->whereNotIn($key, $values, \true);
|
574 |
-
}
|
575 |
-
/**
|
576 |
-
* Filter the items, removing any items that don't match the given type(s).
|
577 |
-
*
|
578 |
-
* @param string|string[] $type
|
579 |
-
* @return static
|
580 |
-
*/
|
581 |
-
public function whereInstanceOf($type)
|
582 |
-
{
|
583 |
-
return $this->filter(function ($value) use($type) {
|
584 |
-
if (\is_array($type)) {
|
585 |
-
foreach ($type as $classType) {
|
586 |
-
if ($value instanceof $classType) {
|
587 |
-
return \true;
|
588 |
-
}
|
589 |
-
}
|
590 |
-
return \false;
|
591 |
-
}
|
592 |
-
return $value instanceof $type;
|
593 |
-
});
|
594 |
-
}
|
595 |
-
/**
|
596 |
-
* Pass the collection to the given callback and return the result.
|
597 |
-
*
|
598 |
-
* @param callable $callback
|
599 |
-
* @return mixed
|
600 |
-
*/
|
601 |
-
public function pipe(callable $callback)
|
602 |
-
{
|
603 |
-
return $callback($this);
|
604 |
-
}
|
605 |
-
/**
|
606 |
-
* Pass the collection into a new class.
|
607 |
-
*
|
608 |
-
* @param string $class
|
609 |
-
* @return mixed
|
610 |
-
*/
|
611 |
-
public function pipeInto($class)
|
612 |
-
{
|
613 |
-
return new $class($this);
|
614 |
-
}
|
615 |
-
/**
|
616 |
-
* Pass the collection to the given callback and then return it.
|
617 |
-
*
|
618 |
-
* @param callable $callback
|
619 |
-
* @return $this
|
620 |
-
*/
|
621 |
-
public function tap(callable $callback)
|
622 |
-
{
|
623 |
-
$callback(clone $this);
|
624 |
-
return $this;
|
625 |
-
}
|
626 |
-
/**
|
627 |
-
* Reduce the collection to a single value.
|
628 |
-
*
|
629 |
-
* @param callable $callback
|
630 |
-
* @param mixed $initial
|
631 |
-
* @return mixed
|
632 |
-
*/
|
633 |
-
public function reduce(callable $callback, $initial = null)
|
634 |
-
{
|
635 |
-
$result = $initial;
|
636 |
-
foreach ($this as $key => $value) {
|
637 |
-
$result = $callback($result, $value, $key);
|
638 |
-
}
|
639 |
-
return $result;
|
640 |
-
}
|
641 |
-
/**
|
642 |
-
* Reduce the collection to multiple aggregate values.
|
643 |
-
*
|
644 |
-
* @param callable $callback
|
645 |
-
* @param mixed ...$initial
|
646 |
-
* @return array
|
647 |
-
*
|
648 |
-
* @deprecated Use "reduceSpread" instead
|
649 |
-
*
|
650 |
-
* @throws \UnexpectedValueException
|
651 |
-
*/
|
652 |
-
public function reduceMany(callable $callback, ...$initial)
|
653 |
-
{
|
654 |
-
return $this->reduceSpread($callback, ...$initial);
|
655 |
-
}
|
656 |
-
/**
|
657 |
-
* Reduce the collection to multiple aggregate values.
|
658 |
-
*
|
659 |
-
* @param callable $callback
|
660 |
-
* @param mixed ...$initial
|
661 |
-
* @return array
|
662 |
-
*
|
663 |
-
* @throws \UnexpectedValueException
|
664 |
-
*/
|
665 |
-
public function reduceSpread(callable $callback, ...$initial)
|
666 |
-
{
|
667 |
-
$result = $initial;
|
668 |
-
foreach ($this as $key => $value) {
|
669 |
-
$result = \call_user_func_array($callback, \array_merge($result, [$value, $key]));
|
670 |
-
if (!\is_array($result)) {
|
671 |
-
throw new UnexpectedValueException(\sprintf("%s::reduceMany expects reducer to return an array, but got a '%s' instead.", class_basename(static::class), \gettype($result)));
|
672 |
-
}
|
673 |
-
}
|
674 |
-
return $result;
|
675 |
-
}
|
676 |
-
/**
|
677 |
-
* Reduce an associative collection to a single value.
|
678 |
-
*
|
679 |
-
* @param callable $callback
|
680 |
-
* @param mixed $initial
|
681 |
-
* @return mixed
|
682 |
-
*/
|
683 |
-
public function reduceWithKeys(callable $callback, $initial = null)
|
684 |
-
{
|
685 |
-
return $this->reduce($callback, $initial);
|
686 |
-
}
|
687 |
-
/**
|
688 |
-
* Create a collection of all elements that do not pass a given truth test.
|
689 |
-
*
|
690 |
-
* @param callable|mixed $callback
|
691 |
-
* @return static
|
692 |
-
*/
|
693 |
-
public function reject($callback = \true)
|
694 |
-
{
|
695 |
-
$useAsCallable = $this->useAsCallable($callback);
|
696 |
-
return $this->filter(function ($value, $key) use($callback, $useAsCallable) {
|
697 |
-
return $useAsCallable ? !$callback($value, $key) : $value != $callback;
|
698 |
-
});
|
699 |
-
}
|
700 |
-
/**
|
701 |
-
* Return only unique items from the collection array using strict comparison.
|
702 |
-
*
|
703 |
-
* @param string|callable|null $key
|
704 |
-
* @return static
|
705 |
-
*/
|
706 |
-
public function uniqueStrict($key = null)
|
707 |
-
{
|
708 |
-
return $this->unique($key, \true);
|
709 |
-
}
|
710 |
-
/**
|
711 |
-
* Collect the values into a collection.
|
712 |
-
*
|
713 |
-
* @return \Illuminate\Support\Collection
|
714 |
-
*/
|
715 |
-
public function collect()
|
716 |
-
{
|
717 |
-
return new Collection($this->all());
|
718 |
-
}
|
719 |
-
/**
|
720 |
-
* Get the collection of items as a plain array.
|
721 |
-
*
|
722 |
-
* @return array
|
723 |
-
*/
|
724 |
-
public function toArray()
|
725 |
-
{
|
726 |
-
return $this->map(function ($value) {
|
727 |
-
return $value instanceof Arrayable ? $value->toArray() : $value;
|
728 |
-
})->all();
|
729 |
-
}
|
730 |
-
/**
|
731 |
-
* Convert the object into something JSON serializable.
|
732 |
-
*
|
733 |
-
* @return array
|
734 |
-
*/
|
735 |
-
#[\ReturnTypeWillChange]
|
736 |
-
public function jsonSerialize()
|
737 |
-
{
|
738 |
-
return \array_map(function ($value) {
|
739 |
-
if ($value instanceof JsonSerializable) {
|
740 |
-
return $value->jsonSerialize();
|
741 |
-
} elseif ($value instanceof Jsonable) {
|
742 |
-
return \json_decode($value->toJson(), \true);
|
743 |
-
} elseif ($value instanceof Arrayable) {
|
744 |
-
return $value->toArray();
|
745 |
-
}
|
746 |
-
return $value;
|
747 |
-
}, $this->all());
|
748 |
-
}
|
749 |
-
/**
|
750 |
-
* Get the collection of items as JSON.
|
751 |
-
*
|
752 |
-
* @param int $options
|
753 |
-
* @return string
|
754 |
-
*/
|
755 |
-
public function toJson($options = 0)
|
756 |
-
{
|
757 |
-
return \json_encode($this->jsonSerialize(), $options);
|
758 |
-
}
|
759 |
-
/**
|
760 |
-
* Get a CachingIterator instance.
|
761 |
-
*
|
762 |
-
* @param int $flags
|
763 |
-
* @return \CachingIterator
|
764 |
-
*/
|
765 |
-
public function getCachingIterator($flags = CachingIterator::CALL_TOSTRING)
|
766 |
-
{
|
767 |
-
return new CachingIterator($this->getIterator(), $flags);
|
768 |
-
}
|
769 |
-
/**
|
770 |
-
* Convert the collection to its string representation.
|
771 |
-
*
|
772 |
-
* @return string
|
773 |
-
*/
|
774 |
-
public function __toString()
|
775 |
-
{
|
776 |
-
return $this->escapeWhenCastingToString ? e($this->toJson()) : $this->toJson();
|
777 |
-
}
|
778 |
-
/**
|
779 |
-
* Indicate that the model's string representation should be escaped when __toString is invoked.
|
780 |
-
*
|
781 |
-
* @param bool $escape
|
782 |
-
* @return $this
|
783 |
-
*/
|
784 |
-
public function escapeWhenCastingToString($escape = \true)
|
785 |
-
{
|
786 |
-
$this->escapeWhenCastingToString = $escape;
|
787 |
-
return $this;
|
788 |
-
}
|
789 |
-
/**
|
790 |
-
* Add a method to the list of proxied methods.
|
791 |
-
*
|
792 |
-
* @param string $method
|
793 |
-
* @return void
|
794 |
-
*/
|
795 |
-
public static function proxy($method)
|
796 |
-
{
|
797 |
-
static::$proxies[] = $method;
|
798 |
-
}
|
799 |
-
/**
|
800 |
-
* Dynamically access collection proxies.
|
801 |
-
*
|
802 |
-
* @param string $key
|
803 |
-
* @return mixed
|
804 |
-
*
|
805 |
-
* @throws \Exception
|
806 |
-
*/
|
807 |
-
public function __get($key)
|
808 |
-
{
|
809 |
-
if (!\in_array($key, static::$proxies)) {
|
810 |
-
throw new Exception("Property [{$key}] does not exist on this collection instance.");
|
811 |
-
}
|
812 |
-
return new HigherOrderCollectionProxy($this, $key);
|
813 |
-
}
|
814 |
-
/**
|
815 |
-
* Results array of items from Collection or Arrayable.
|
816 |
-
*
|
817 |
-
* @param mixed $items
|
818 |
-
* @return array
|
819 |
-
*/
|
820 |
-
protected function getArrayableItems($items)
|
821 |
-
{
|
822 |
-
if (\is_array($items)) {
|
823 |
-
return $items;
|
824 |
-
} elseif ($items instanceof Enumerable) {
|
825 |
-
return $items->all();
|
826 |
-
} elseif ($items instanceof Arrayable) {
|
827 |
-
return $items->toArray();
|
828 |
-
} elseif ($items instanceof Jsonable) {
|
829 |
-
return \json_decode($items->toJson(), \true);
|
830 |
-
} elseif ($items instanceof JsonSerializable) {
|
831 |
-
return (array) $items->jsonSerialize();
|
832 |
-
} elseif ($items instanceof Traversable) {
|
833 |
-
return \iterator_to_array($items);
|
834 |
-
}
|
835 |
-
return (array) $items;
|
836 |
-
}
|
837 |
-
/**
|
838 |
-
* Get an operator checker callback.
|
839 |
-
*
|
840 |
-
* @param string $key
|
841 |
-
* @param string|null $operator
|
842 |
-
* @param mixed $value
|
843 |
-
* @return \Closure
|
844 |
-
*/
|
845 |
-
protected function operatorForWhere($key, $operator = null, $value = null)
|
846 |
-
{
|
847 |
-
if (\func_num_args() === 1) {
|
848 |
-
$value = \true;
|
849 |
-
$operator = '=';
|
850 |
-
}
|
851 |
-
if (\func_num_args() === 2) {
|
852 |
-
$value = $operator;
|
853 |
-
$operator = '=';
|
854 |
-
}
|
855 |
-
return function ($item) use($key, $operator, $value) {
|
856 |
-
$retrieved = data_get($item, $key);
|
857 |
-
$strings = \array_filter([$retrieved, $value], function ($value) {
|
858 |
-
return \is_string($value) || \is_object($value) && \method_exists($value, '__toString');
|
859 |
-
});
|
860 |
-
if (\count($strings) < 2 && \count(\array_filter([$retrieved, $value], 'is_object')) == 1) {
|
861 |
-
return \in_array($operator, ['!=', '<>', '!==']);
|
862 |
-
}
|
863 |
-
switch ($operator) {
|
864 |
-
default:
|
865 |
-
case '=':
|
866 |
-
case '==':
|
867 |
-
return $retrieved == $value;
|
868 |
-
case '!=':
|
869 |
-
case '<>':
|
870 |
-
return $retrieved != $value;
|
871 |
-
case '<':
|
872 |
-
return $retrieved < $value;
|
873 |
-
case '>':
|
874 |
-
return $retrieved > $value;
|
875 |
-
case '<=':
|
876 |
-
return $retrieved <= $value;
|
877 |
-
case '>=':
|
878 |
-
return $retrieved >= $value;
|
879 |
-
case '===':
|
880 |
-
return $retrieved === $value;
|
881 |
-
case '!==':
|
882 |
-
return $retrieved !== $value;
|
883 |
-
}
|
884 |
-
};
|
885 |
-
}
|
886 |
-
/**
|
887 |
-
* Determine if the given value is callable, but not a string.
|
888 |
-
*
|
889 |
-
* @param mixed $value
|
890 |
-
* @return bool
|
891 |
-
*/
|
892 |
-
protected function useAsCallable($value)
|
893 |
-
{
|
894 |
-
return !\is_string($value) && \is_callable($value);
|
895 |
-
}
|
896 |
-
/**
|
897 |
-
* Get a value retrieving callback.
|
898 |
-
*
|
899 |
-
* @param callable|string|null $value
|
900 |
-
* @return callable
|
901 |
-
*/
|
902 |
-
protected function valueRetriever($value)
|
903 |
-
{
|
904 |
-
if ($this->useAsCallable($value)) {
|
905 |
-
return $value;
|
906 |
-
}
|
907 |
-
return function ($item) use($value) {
|
908 |
-
return data_get($item, $value);
|
909 |
-
};
|
910 |
-
}
|
911 |
-
/**
|
912 |
-
* Make a function to check an item's equality.
|
913 |
-
*
|
914 |
-
* @param mixed $value
|
915 |
-
* @return \Closure
|
916 |
-
*/
|
917 |
-
protected function equality($value)
|
918 |
-
{
|
919 |
-
return function ($item) use($value) {
|
920 |
-
return $item === $value;
|
921 |
-
};
|
922 |
-
}
|
923 |
-
/**
|
924 |
-
* Make a function using another function, by negating its result.
|
925 |
-
*
|
926 |
-
* @param \Closure $callback
|
927 |
-
* @return \Closure
|
928 |
-
*/
|
929 |
-
protected function negate(Closure $callback)
|
930 |
-
{
|
931 |
-
return function (...$params) use($callback) {
|
932 |
-
return !$callback(...$params);
|
933 |
-
};
|
934 |
-
}
|
935 |
-
/**
|
936 |
-
* Make a function that returns what's passed to it.
|
937 |
-
*
|
938 |
-
* @return \Closure
|
939 |
-
*/
|
940 |
-
protected function identity()
|
941 |
-
{
|
942 |
-
return function ($value) {
|
943 |
-
return $value;
|
944 |
-
};
|
945 |
-
}
|
946 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/collections/helpers.php
DELETED
@@ -1,166 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework;
|
4 |
-
|
5 |
-
use Data443\gdpr\framework\Illuminate\Support\Arr;
|
6 |
-
use Data443\gdpr\framework\Illuminate\Support\Collection;
|
7 |
-
if (!\function_exists('Data443\\gdpr\\framework\\collect')) {
|
8 |
-
/**
|
9 |
-
* Create a collection from the given value.
|
10 |
-
*
|
11 |
-
* @param mixed $value
|
12 |
-
* @return \Illuminate\Support\Collection
|
13 |
-
*/
|
14 |
-
function collect($value = null)
|
15 |
-
{
|
16 |
-
return new Collection($value);
|
17 |
-
}
|
18 |
-
}
|
19 |
-
if (!\function_exists('Data443\\gdpr\\framework\\data_fill')) {
|
20 |
-
/**
|
21 |
-
* Fill in data where it's missing.
|
22 |
-
*
|
23 |
-
* @param mixed $target
|
24 |
-
* @param string|array $key
|
25 |
-
* @param mixed $value
|
26 |
-
* @return mixed
|
27 |
-
*/
|
28 |
-
function data_fill(&$target, $key, $value)
|
29 |
-
{
|
30 |
-
return data_set($target, $key, $value, \false);
|
31 |
-
}
|
32 |
-
}
|
33 |
-
if (!\function_exists('Data443\\gdpr\\framework\\data_get')) {
|
34 |
-
/**
|
35 |
-
* Get an item from an array or object using "dot" notation.
|
36 |
-
*
|
37 |
-
* @param mixed $target
|
38 |
-
* @param string|array|int|null $key
|
39 |
-
* @param mixed $default
|
40 |
-
* @return mixed
|
41 |
-
*/
|
42 |
-
function data_get($target, $key, $default = null)
|
43 |
-
{
|
44 |
-
if (\is_null($key)) {
|
45 |
-
return $target;
|
46 |
-
}
|
47 |
-
$key = \is_array($key) ? $key : \explode('.', $key);
|
48 |
-
foreach ($key as $i => $segment) {
|
49 |
-
unset($key[$i]);
|
50 |
-
if (\is_null($segment)) {
|
51 |
-
return $target;
|
52 |
-
}
|
53 |
-
if ($segment === '*') {
|
54 |
-
if ($target instanceof Collection) {
|
55 |
-
$target = $target->all();
|
56 |
-
} elseif (!\is_array($target)) {
|
57 |
-
return value($default);
|
58 |
-
}
|
59 |
-
$result = [];
|
60 |
-
foreach ($target as $item) {
|
61 |
-
$result[] = data_get($item, $key);
|
62 |
-
}
|
63 |
-
return \in_array('*', $key) ? Arr::collapse($result) : $result;
|
64 |
-
}
|
65 |
-
if (Arr::accessible($target) && Arr::exists($target, $segment)) {
|
66 |
-
$target = $target[$segment];
|
67 |
-
} elseif (\is_object($target) && isset($target->{$segment})) {
|
68 |
-
$target = $target->{$segment};
|
69 |
-
} else {
|
70 |
-
return value($default);
|
71 |
-
}
|
72 |
-
}
|
73 |
-
return $target;
|
74 |
-
}
|
75 |
-
}
|
76 |
-
if (!\function_exists('Data443\\gdpr\\framework\\data_set')) {
|
77 |
-
/**
|
78 |
-
* Set an item on an array or object using dot notation.
|
79 |
-
*
|
80 |
-
* @param mixed $target
|
81 |
-
* @param string|array $key
|
82 |
-
* @param mixed $value
|
83 |
-
* @param bool $overwrite
|
84 |
-
* @return mixed
|
85 |
-
*/
|
86 |
-
function data_set(&$target, $key, $value, $overwrite = \true)
|
87 |
-
{
|
88 |
-
$segments = \is_array($key) ? $key : \explode('.', $key);
|
89 |
-
if (($segment = \array_shift($segments)) === '*') {
|
90 |
-
if (!Arr::accessible($target)) {
|
91 |
-
$target = [];
|
92 |
-
}
|
93 |
-
if ($segments) {
|
94 |
-
foreach ($target as &$inner) {
|
95 |
-
data_set($inner, $segments, $value, $overwrite);
|
96 |
-
}
|
97 |
-
} elseif ($overwrite) {
|
98 |
-
foreach ($target as &$inner) {
|
99 |
-
$inner = $value;
|
100 |
-
}
|
101 |
-
}
|
102 |
-
} elseif (Arr::accessible($target)) {
|
103 |
-
if ($segments) {
|
104 |
-
if (!Arr::exists($target, $segment)) {
|
105 |
-
$target[$segment] = [];
|
106 |
-
}
|
107 |
-
data_set($target[$segment], $segments, $value, $overwrite);
|
108 |
-
} elseif ($overwrite || !Arr::exists($target, $segment)) {
|
109 |
-
$target[$segment] = $value;
|
110 |
-
}
|
111 |
-
} elseif (\is_object($target)) {
|
112 |
-
if ($segments) {
|
113 |
-
if (!isset($target->{$segment})) {
|
114 |
-
$target->{$segment} = [];
|
115 |
-
}
|
116 |
-
data_set($target->{$segment}, $segments, $value, $overwrite);
|
117 |
-
} elseif ($overwrite || !isset($target->{$segment})) {
|
118 |
-
$target->{$segment} = $value;
|
119 |
-
}
|
120 |
-
} else {
|
121 |
-
$target = [];
|
122 |
-
if ($segments) {
|
123 |
-
data_set($target[$segment], $segments, $value, $overwrite);
|
124 |
-
} elseif ($overwrite) {
|
125 |
-
$target[$segment] = $value;
|
126 |
-
}
|
127 |
-
}
|
128 |
-
return $target;
|
129 |
-
}
|
130 |
-
}
|
131 |
-
if (!\function_exists('Data443\\gdpr\\framework\\head')) {
|
132 |
-
/**
|
133 |
-
* Get the first element of an array. Useful for method chaining.
|
134 |
-
*
|
135 |
-
* @param array $array
|
136 |
-
* @return mixed
|
137 |
-
*/
|
138 |
-
function head($array)
|
139 |
-
{
|
140 |
-
return \reset($array);
|
141 |
-
}
|
142 |
-
}
|
143 |
-
if (!\function_exists('Data443\\gdpr\\framework\\last')) {
|
144 |
-
/**
|
145 |
-
* Get the last element from an array.
|
146 |
-
*
|
147 |
-
* @param array $array
|
148 |
-
* @return mixed
|
149 |
-
*/
|
150 |
-
function last($array)
|
151 |
-
{
|
152 |
-
return \end($array);
|
153 |
-
}
|
154 |
-
}
|
155 |
-
if (!\function_exists('Data443\\gdpr\\framework\\value')) {
|
156 |
-
/**
|
157 |
-
* Return the default value of the given value.
|
158 |
-
*
|
159 |
-
* @param mixed $value
|
160 |
-
* @return mixed
|
161 |
-
*/
|
162 |
-
function value($value, ...$args)
|
163 |
-
{
|
164 |
-
return $value instanceof \Closure ? $value(...$args) : $value;
|
165 |
-
}
|
166 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/config/Repository.php
DELETED
@@ -1,161 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Config;
|
4 |
-
|
5 |
-
use ArrayAccess;
|
6 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Config\Repository as ConfigContract;
|
7 |
-
use Data443\gdpr\framework\Illuminate\Support\Arr;
|
8 |
-
class Repository implements ArrayAccess, ConfigContract
|
9 |
-
{
|
10 |
-
/**
|
11 |
-
* All of the configuration items.
|
12 |
-
*
|
13 |
-
* @var array
|
14 |
-
*/
|
15 |
-
protected $items = [];
|
16 |
-
/**
|
17 |
-
* Create a new configuration repository.
|
18 |
-
*
|
19 |
-
* @param array $items
|
20 |
-
* @return void
|
21 |
-
*/
|
22 |
-
public function __construct(array $items = [])
|
23 |
-
{
|
24 |
-
$this->items = $items;
|
25 |
-
}
|
26 |
-
/**
|
27 |
-
* Determine if the given configuration value exists.
|
28 |
-
*
|
29 |
-
* @param string $key
|
30 |
-
* @return bool
|
31 |
-
*/
|
32 |
-
public function has($key)
|
33 |
-
{
|
34 |
-
return Arr::has($this->items, $key);
|
35 |
-
}
|
36 |
-
/**
|
37 |
-
* Get the specified configuration value.
|
38 |
-
*
|
39 |
-
* @param array|string $key
|
40 |
-
* @param mixed $default
|
41 |
-
* @return mixed
|
42 |
-
*/
|
43 |
-
public function get($key, $default = null)
|
44 |
-
{
|
45 |
-
if (\is_array($key)) {
|
46 |
-
return $this->getMany($key);
|
47 |
-
}
|
48 |
-
return Arr::get($this->items, $key, $default);
|
49 |
-
}
|
50 |
-
/**
|
51 |
-
* Get many configuration values.
|
52 |
-
*
|
53 |
-
* @param array $keys
|
54 |
-
* @return array
|
55 |
-
*/
|
56 |
-
public function getMany($keys)
|
57 |
-
{
|
58 |
-
$config = [];
|
59 |
-
foreach ($keys as $key => $default) {
|
60 |
-
if (\is_numeric($key)) {
|
61 |
-
[$key, $default] = [$default, null];
|
62 |
-
}
|
63 |
-
$config[$key] = Arr::get($this->items, $key, $default);
|
64 |
-
}
|
65 |
-
return $config;
|
66 |
-
}
|
67 |
-
/**
|
68 |
-
* Set a given configuration value.
|
69 |
-
*
|
70 |
-
* @param array|string $key
|
71 |
-
* @param mixed $value
|
72 |
-
* @return void
|
73 |
-
*/
|
74 |
-
public function set($key, $value = null)
|
75 |
-
{
|
76 |
-
$keys = \is_array($key) ? $key : [$key => $value];
|
77 |
-
foreach ($keys as $key => $value) {
|
78 |
-
Arr::set($this->items, $key, $value);
|
79 |
-
}
|
80 |
-
}
|
81 |
-
/**
|
82 |
-
* Prepend a value onto an array configuration value.
|
83 |
-
*
|
84 |
-
* @param string $key
|
85 |
-
* @param mixed $value
|
86 |
-
* @return void
|
87 |
-
*/
|
88 |
-
public function prepend($key, $value)
|
89 |
-
{
|
90 |
-
$array = $this->get($key);
|
91 |
-
\array_unshift($array, $value);
|
92 |
-
$this->set($key, $array);
|
93 |
-
}
|
94 |
-
/**
|
95 |
-
* Push a value onto an array configuration value.
|
96 |
-
*
|
97 |
-
* @param string $key
|
98 |
-
* @param mixed $value
|
99 |
-
* @return void
|
100 |
-
*/
|
101 |
-
public function push($key, $value)
|
102 |
-
{
|
103 |
-
$array = $this->get($key);
|
104 |
-
$array[] = $value;
|
105 |
-
$this->set($key, $array);
|
106 |
-
}
|
107 |
-
/**
|
108 |
-
* Get all of the configuration items for the application.
|
109 |
-
*
|
110 |
-
* @return array
|
111 |
-
*/
|
112 |
-
public function all()
|
113 |
-
{
|
114 |
-
return $this->items;
|
115 |
-
}
|
116 |
-
/**
|
117 |
-
* Determine if the given configuration option exists.
|
118 |
-
*
|
119 |
-
* @param string $key
|
120 |
-
* @return bool
|
121 |
-
*/
|
122 |
-
#[\ReturnTypeWillChange]
|
123 |
-
public function offsetExists($key)
|
124 |
-
{
|
125 |
-
return $this->has($key);
|
126 |
-
}
|
127 |
-
/**
|
128 |
-
* Get a configuration option.
|
129 |
-
*
|
130 |
-
* @param string $key
|
131 |
-
* @return mixed
|
132 |
-
*/
|
133 |
-
#[\ReturnTypeWillChange]
|
134 |
-
public function offsetGet($key)
|
135 |
-
{
|
136 |
-
return $this->get($key);
|
137 |
-
}
|
138 |
-
/**
|
139 |
-
* Set a configuration option.
|
140 |
-
*
|
141 |
-
* @param string $key
|
142 |
-
* @param mixed $value
|
143 |
-
* @return void
|
144 |
-
*/
|
145 |
-
#[\ReturnTypeWillChange]
|
146 |
-
public function offsetSet($key, $value)
|
147 |
-
{
|
148 |
-
$this->set($key, $value);
|
149 |
-
}
|
150 |
-
/**
|
151 |
-
* Unset a configuration option.
|
152 |
-
*
|
153 |
-
* @param string $key
|
154 |
-
* @return void
|
155 |
-
*/
|
156 |
-
#[\ReturnTypeWillChange]
|
157 |
-
public function offsetUnset($key)
|
158 |
-
{
|
159 |
-
$this->set($key, null);
|
160 |
-
}
|
161 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/container/BoundMethod.php
DELETED
@@ -1,167 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Container;
|
4 |
-
|
5 |
-
use Closure;
|
6 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Container\BindingResolutionException;
|
7 |
-
use InvalidArgumentException;
|
8 |
-
use ReflectionFunction;
|
9 |
-
use ReflectionMethod;
|
10 |
-
class BoundMethod
|
11 |
-
{
|
12 |
-
/**
|
13 |
-
* Call the given Closure / class@method and inject its dependencies.
|
14 |
-
*
|
15 |
-
* @param \Illuminate\Container\Container $container
|
16 |
-
* @param callable|string $callback
|
17 |
-
* @param array $parameters
|
18 |
-
* @param string|null $defaultMethod
|
19 |
-
* @return mixed
|
20 |
-
*
|
21 |
-
* @throws \ReflectionException
|
22 |
-
* @throws \InvalidArgumentException
|
23 |
-
*/
|
24 |
-
public static function call($container, $callback, array $parameters = [], $defaultMethod = null)
|
25 |
-
{
|
26 |
-
if (\is_string($callback) && !$defaultMethod && \method_exists($callback, '__invoke')) {
|
27 |
-
$defaultMethod = '__invoke';
|
28 |
-
}
|
29 |
-
if (static::isCallableWithAtSign($callback) || $defaultMethod) {
|
30 |
-
return static::callClass($container, $callback, $parameters, $defaultMethod);
|
31 |
-
}
|
32 |
-
return static::callBoundMethod($container, $callback, function () use($container, $callback, $parameters) {
|
33 |
-
return $callback(...\array_values(static::getMethodDependencies($container, $callback, $parameters)));
|
34 |
-
});
|
35 |
-
}
|
36 |
-
/**
|
37 |
-
* Call a string reference to a class using Class@method syntax.
|
38 |
-
*
|
39 |
-
* @param \Illuminate\Container\Container $container
|
40 |
-
* @param string $target
|
41 |
-
* @param array $parameters
|
42 |
-
* @param string|null $defaultMethod
|
43 |
-
* @return mixed
|
44 |
-
*
|
45 |
-
* @throws \InvalidArgumentException
|
46 |
-
*/
|
47 |
-
protected static function callClass($container, $target, array $parameters = [], $defaultMethod = null)
|
48 |
-
{
|
49 |
-
$segments = \explode('@', $target);
|
50 |
-
// We will assume an @ sign is used to delimit the class name from the method
|
51 |
-
// name. We will split on this @ sign and then build a callable array that
|
52 |
-
// we can pass right back into the "call" method for dependency binding.
|
53 |
-
$method = \count($segments) === 2 ? $segments[1] : $defaultMethod;
|
54 |
-
if (\is_null($method)) {
|
55 |
-
throw new InvalidArgumentException('Method not provided.');
|
56 |
-
}
|
57 |
-
return static::call($container, [$container->make($segments[0]), $method], $parameters);
|
58 |
-
}
|
59 |
-
/**
|
60 |
-
* Call a method that has been bound to the container.
|
61 |
-
*
|
62 |
-
* @param \Illuminate\Container\Container $container
|
63 |
-
* @param callable $callback
|
64 |
-
* @param mixed $default
|
65 |
-
* @return mixed
|
66 |
-
*/
|
67 |
-
protected static function callBoundMethod($container, $callback, $default)
|
68 |
-
{
|
69 |
-
if (!\is_array($callback)) {
|
70 |
-
return Util::unwrapIfClosure($default);
|
71 |
-
}
|
72 |
-
// Here we need to turn the array callable into a Class@method string we can use to
|
73 |
-
// examine the container and see if there are any method bindings for this given
|
74 |
-
// method. If there are, we can call this method binding callback immediately.
|
75 |
-
$method = static::normalizeMethod($callback);
|
76 |
-
if ($container->hasMethodBinding($method)) {
|
77 |
-
return $container->callMethodBinding($method, $callback[0]);
|
78 |
-
}
|
79 |
-
return Util::unwrapIfClosure($default);
|
80 |
-
}
|
81 |
-
/**
|
82 |
-
* Normalize the given callback into a Class@method string.
|
83 |
-
*
|
84 |
-
* @param callable $callback
|
85 |
-
* @return string
|
86 |
-
*/
|
87 |
-
protected static function normalizeMethod($callback)
|
88 |
-
{
|
89 |
-
$class = \is_string($callback[0]) ? $callback[0] : \get_class($callback[0]);
|
90 |
-
return "{$class}@{$callback[1]}";
|
91 |
-
}
|
92 |
-
/**
|
93 |
-
* Get all dependencies for a given method.
|
94 |
-
*
|
95 |
-
* @param \Illuminate\Container\Container $container
|
96 |
-
* @param callable|string $callback
|
97 |
-
* @param array $parameters
|
98 |
-
* @return array
|
99 |
-
*
|
100 |
-
* @throws \ReflectionException
|
101 |
-
*/
|
102 |
-
protected static function getMethodDependencies($container, $callback, array $parameters = [])
|
103 |
-
{
|
104 |
-
$dependencies = [];
|
105 |
-
foreach (static::getCallReflector($callback)->getParameters() as $parameter) {
|
106 |
-
static::addDependencyForCallParameter($container, $parameter, $parameters, $dependencies);
|
107 |
-
}
|
108 |
-
return \array_merge($dependencies, \array_values($parameters));
|
109 |
-
}
|
110 |
-
/**
|
111 |
-
* Get the proper reflection instance for the given callback.
|
112 |
-
*
|
113 |
-
* @param callable|string $callback
|
114 |
-
* @return \ReflectionFunctionAbstract
|
115 |
-
*
|
116 |
-
* @throws \ReflectionException
|
117 |
-
*/
|
118 |
-
protected static function getCallReflector($callback)
|
119 |
-
{
|
120 |
-
if (\is_string($callback) && \strpos($callback, '::') !== \false) {
|
121 |
-
$callback = \explode('::', $callback);
|
122 |
-
} elseif (\is_object($callback) && !$callback instanceof Closure) {
|
123 |
-
$callback = [$callback, '__invoke'];
|
124 |
-
}
|
125 |
-
return \is_array($callback) ? new ReflectionMethod($callback[0], $callback[1]) : new ReflectionFunction($callback);
|
126 |
-
}
|
127 |
-
/**
|
128 |
-
* Get the dependency for the given call parameter.
|
129 |
-
*
|
130 |
-
* @param \Illuminate\Container\Container $container
|
131 |
-
* @param \ReflectionParameter $parameter
|
132 |
-
* @param array $parameters
|
133 |
-
* @param array $dependencies
|
134 |
-
* @return void
|
135 |
-
*
|
136 |
-
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
137 |
-
*/
|
138 |
-
protected static function addDependencyForCallParameter($container, $parameter, array &$parameters, &$dependencies)
|
139 |
-
{
|
140 |
-
if (\array_key_exists($paramName = $parameter->getName(), $parameters)) {
|
141 |
-
$dependencies[] = $parameters[$paramName];
|
142 |
-
unset($parameters[$paramName]);
|
143 |
-
} elseif (!\is_null($className = Util::getParameterClassName($parameter))) {
|
144 |
-
if (\array_key_exists($className, $parameters)) {
|
145 |
-
$dependencies[] = $parameters[$className];
|
146 |
-
unset($parameters[$className]);
|
147 |
-
} else {
|
148 |
-
$dependencies[] = $container->make($className);
|
149 |
-
}
|
150 |
-
} elseif ($parameter->isDefaultValueAvailable()) {
|
151 |
-
$dependencies[] = $parameter->getDefaultValue();
|
152 |
-
} elseif (!$parameter->isOptional() && !\array_key_exists($paramName, $parameters)) {
|
153 |
-
$message = "Unable to resolve dependency [{$parameter}] in class {$parameter->getDeclaringClass()->getName()}";
|
154 |
-
throw new BindingResolutionException($message);
|
155 |
-
}
|
156 |
-
}
|
157 |
-
/**
|
158 |
-
* Determine if the given string is in Class@method syntax.
|
159 |
-
*
|
160 |
-
* @param mixed $callback
|
161 |
-
* @return bool
|
162 |
-
*/
|
163 |
-
protected static function isCallableWithAtSign($callback)
|
164 |
-
{
|
165 |
-
return \is_string($callback) && \strpos($callback, '@') !== \false;
|
166 |
-
}
|
167 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/container/Container.php
DELETED
@@ -1,1272 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Container;
|
4 |
-
|
5 |
-
use ArrayAccess;
|
6 |
-
use Closure;
|
7 |
-
use Exception;
|
8 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Container\BindingResolutionException;
|
9 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Container\CircularDependencyException;
|
10 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Container\Container as ContainerContract;
|
11 |
-
use LogicException;
|
12 |
-
use ReflectionClass;
|
13 |
-
use ReflectionException;
|
14 |
-
use ReflectionParameter;
|
15 |
-
use TypeError;
|
16 |
-
class Container implements ArrayAccess, ContainerContract
|
17 |
-
{
|
18 |
-
/**
|
19 |
-
* The current globally available container (if any).
|
20 |
-
*
|
21 |
-
* @var static
|
22 |
-
*/
|
23 |
-
protected static $instance;
|
24 |
-
/**
|
25 |
-
* An array of the types that have been resolved.
|
26 |
-
*
|
27 |
-
* @var bool[]
|
28 |
-
*/
|
29 |
-
protected $resolved = [];
|
30 |
-
/**
|
31 |
-
* The container's bindings.
|
32 |
-
*
|
33 |
-
* @var array[]
|
34 |
-
*/
|
35 |
-
protected $bindings = [];
|
36 |
-
/**
|
37 |
-
* The container's method bindings.
|
38 |
-
*
|
39 |
-
* @var \Closure[]
|
40 |
-
*/
|
41 |
-
protected $methodBindings = [];
|
42 |
-
/**
|
43 |
-
* The container's shared instances.
|
44 |
-
*
|
45 |
-
* @var object[]
|
46 |
-
*/
|
47 |
-
protected $instances = [];
|
48 |
-
/**
|
49 |
-
* The container's scoped instances.
|
50 |
-
*
|
51 |
-
* @var array
|
52 |
-
*/
|
53 |
-
protected $scopedInstances = [];
|
54 |
-
/**
|
55 |
-
* The registered type aliases.
|
56 |
-
*
|
57 |
-
* @var string[]
|
58 |
-
*/
|
59 |
-
protected $aliases = [];
|
60 |
-
/**
|
61 |
-
* The registered aliases keyed by the abstract name.
|
62 |
-
*
|
63 |
-
* @var array[]
|
64 |
-
*/
|
65 |
-
protected $abstractAliases = [];
|
66 |
-
/**
|
67 |
-
* The extension closures for services.
|
68 |
-
*
|
69 |
-
* @var array[]
|
70 |
-
*/
|
71 |
-
protected $extenders = [];
|
72 |
-
/**
|
73 |
-
* All of the registered tags.
|
74 |
-
*
|
75 |
-
* @var array[]
|
76 |
-
*/
|
77 |
-
protected $tags = [];
|
78 |
-
/**
|
79 |
-
* The stack of concretions currently being built.
|
80 |
-
*
|
81 |
-
* @var array[]
|
82 |
-
*/
|
83 |
-
protected $buildStack = [];
|
84 |
-
/**
|
85 |
-
* The parameter override stack.
|
86 |
-
*
|
87 |
-
* @var array[]
|
88 |
-
*/
|
89 |
-
protected $with = [];
|
90 |
-
/**
|
91 |
-
* The contextual binding map.
|
92 |
-
*
|
93 |
-
* @var array[]
|
94 |
-
*/
|
95 |
-
public $contextual = [];
|
96 |
-
/**
|
97 |
-
* All of the registered rebound callbacks.
|
98 |
-
*
|
99 |
-
* @var array[]
|
100 |
-
*/
|
101 |
-
protected $reboundCallbacks = [];
|
102 |
-
/**
|
103 |
-
* All of the global before resolving callbacks.
|
104 |
-
*
|
105 |
-
* @var \Closure[]
|
106 |
-
*/
|
107 |
-
protected $globalBeforeResolvingCallbacks = [];
|
108 |
-
/**
|
109 |
-
* All of the global resolving callbacks.
|
110 |
-
*
|
111 |
-
* @var \Closure[]
|
112 |
-
*/
|
113 |
-
protected $globalResolvingCallbacks = [];
|
114 |
-
/**
|
115 |
-
* All of the global after resolving callbacks.
|
116 |
-
*
|
117 |
-
* @var \Closure[]
|
118 |
-
*/
|
119 |
-
protected $globalAfterResolvingCallbacks = [];
|
120 |
-
/**
|
121 |
-
* All of the before resolving callbacks by class type.
|
122 |
-
*
|
123 |
-
* @var array[]
|
124 |
-
*/
|
125 |
-
protected $beforeResolvingCallbacks = [];
|
126 |
-
/**
|
127 |
-
* All of the resolving callbacks by class type.
|
128 |
-
*
|
129 |
-
* @var array[]
|
130 |
-
*/
|
131 |
-
protected $resolvingCallbacks = [];
|
132 |
-
/**
|
133 |
-
* All of the after resolving callbacks by class type.
|
134 |
-
*
|
135 |
-
* @var array[]
|
136 |
-
*/
|
137 |
-
protected $afterResolvingCallbacks = [];
|
138 |
-
/**
|
139 |
-
* Define a contextual binding.
|
140 |
-
*
|
141 |
-
* @param array|string $concrete
|
142 |
-
* @return \Illuminate\Contracts\Container\ContextualBindingBuilder
|
143 |
-
*/
|
144 |
-
public function when($concrete)
|
145 |
-
{
|
146 |
-
$aliases = [];
|
147 |
-
foreach (Util::arrayWrap($concrete) as $c) {
|
148 |
-
$aliases[] = $this->getAlias($c);
|
149 |
-
}
|
150 |
-
return new ContextualBindingBuilder($this, $aliases);
|
151 |
-
}
|
152 |
-
/**
|
153 |
-
* Determine if the given abstract type has been bound.
|
154 |
-
*
|
155 |
-
* @param string $abstract
|
156 |
-
* @return bool
|
157 |
-
*/
|
158 |
-
public function bound($abstract)
|
159 |
-
{
|
160 |
-
return isset($this->bindings[$abstract]) || isset($this->instances[$abstract]) || $this->isAlias($abstract);
|
161 |
-
}
|
162 |
-
/**
|
163 |
-
* {@inheritdoc}
|
164 |
-
*
|
165 |
-
* @return bool
|
166 |
-
*/
|
167 |
-
public function has($id)
|
168 |
-
{
|
169 |
-
return $this->bound($id);
|
170 |
-
}
|
171 |
-
/**
|
172 |
-
* Determine if the given abstract type has been resolved.
|
173 |
-
*
|
174 |
-
* @param string $abstract
|
175 |
-
* @return bool
|
176 |
-
*/
|
177 |
-
public function resolved($abstract)
|
178 |
-
{
|
179 |
-
if ($this->isAlias($abstract)) {
|
180 |
-
$abstract = $this->getAlias($abstract);
|
181 |
-
}
|
182 |
-
return isset($this->resolved[$abstract]) || isset($this->instances[$abstract]);
|
183 |
-
}
|
184 |
-
/**
|
185 |
-
* Determine if a given type is shared.
|
186 |
-
*
|
187 |
-
* @param string $abstract
|
188 |
-
* @return bool
|
189 |
-
*/
|
190 |
-
public function isShared($abstract)
|
191 |
-
{
|
192 |
-
return isset($this->instances[$abstract]) || isset($this->bindings[$abstract]['shared']) && $this->bindings[$abstract]['shared'] === \true;
|
193 |
-
}
|
194 |
-
/**
|
195 |
-
* Determine if a given string is an alias.
|
196 |
-
*
|
197 |
-
* @param string $name
|
198 |
-
* @return bool
|
199 |
-
*/
|
200 |
-
public function isAlias($name)
|
201 |
-
{
|
202 |
-
return isset($this->aliases[$name]);
|
203 |
-
}
|
204 |
-
/**
|
205 |
-
* Register a binding with the container.
|
206 |
-
*
|
207 |
-
* @param string $abstract
|
208 |
-
* @param \Closure|string|null $concrete
|
209 |
-
* @param bool $shared
|
210 |
-
* @return void
|
211 |
-
*
|
212 |
-
* @throws \TypeError
|
213 |
-
*/
|
214 |
-
public function bind($abstract, $concrete = null, $shared = \false)
|
215 |
-
{
|
216 |
-
$this->dropStaleInstances($abstract);
|
217 |
-
// If no concrete type was given, we will simply set the concrete type to the
|
218 |
-
// abstract type. After that, the concrete type to be registered as shared
|
219 |
-
// without being forced to state their classes in both of the parameters.
|
220 |
-
if (\is_null($concrete)) {
|
221 |
-
$concrete = $abstract;
|
222 |
-
}
|
223 |
-
// If the factory is not a Closure, it means it is just a class name which is
|
224 |
-
// bound into this container to the abstract type and we will just wrap it
|
225 |
-
// up inside its own Closure to give us more convenience when extending.
|
226 |
-
if (!$concrete instanceof Closure) {
|
227 |
-
if (!\is_string($concrete)) {
|
228 |
-
throw new TypeError(self::class . '::bind(): Argument #2 ($concrete) must be of type Closure|string|null');
|
229 |
-
}
|
230 |
-
$concrete = $this->getClosure($abstract, $concrete);
|
231 |
-
}
|
232 |
-
$this->bindings[$abstract] = \compact('concrete', 'shared');
|
233 |
-
// If the abstract type was already resolved in this container we'll fire the
|
234 |
-
// rebound listener so that any objects which have already gotten resolved
|
235 |
-
// can have their copy of the object updated via the listener callbacks.
|
236 |
-
if ($this->resolved($abstract)) {
|
237 |
-
$this->rebound($abstract);
|
238 |
-
}
|
239 |
-
}
|
240 |
-
/**
|
241 |
-
* Get the Closure to be used when building a type.
|
242 |
-
*
|
243 |
-
* @param string $abstract
|
244 |
-
* @param string $concrete
|
245 |
-
* @return \Closure
|
246 |
-
*/
|
247 |
-
protected function getClosure($abstract, $concrete)
|
248 |
-
{
|
249 |
-
return function ($container, $parameters = []) use($abstract, $concrete) {
|
250 |
-
if ($abstract == $concrete) {
|
251 |
-
return $container->build($concrete);
|
252 |
-
}
|
253 |
-
return $container->resolve($concrete, $parameters, $raiseEvents = \false);
|
254 |
-
};
|
255 |
-
}
|
256 |
-
/**
|
257 |
-
* Determine if the container has a method binding.
|
258 |
-
*
|
259 |
-
* @param string $method
|
260 |
-
* @return bool
|
261 |
-
*/
|
262 |
-
public function hasMethodBinding($method)
|
263 |
-
{
|
264 |
-
return isset($this->methodBindings[$method]);
|
265 |
-
}
|
266 |
-
/**
|
267 |
-
* Bind a callback to resolve with Container::call.
|
268 |
-
*
|
269 |
-
* @param array|string $method
|
270 |
-
* @param \Closure $callback
|
271 |
-
* @return void
|
272 |
-
*/
|
273 |
-
public function bindMethod($method, $callback)
|
274 |
-
{
|
275 |
-
$this->methodBindings[$this->parseBindMethod($method)] = $callback;
|
276 |
-
}
|
277 |
-
/**
|
278 |
-
* Get the method to be bound in class@method format.
|
279 |
-
*
|
280 |
-
* @param array|string $method
|
281 |
-
* @return string
|
282 |
-
*/
|
283 |
-
protected function parseBindMethod($method)
|
284 |
-
{
|
285 |
-
if (\is_array($method)) {
|
286 |
-
return $method[0] . '@' . $method[1];
|
287 |
-
}
|
288 |
-
return $method;
|
289 |
-
}
|
290 |
-
/**
|
291 |
-
* Get the method binding for the given method.
|
292 |
-
*
|
293 |
-
* @param string $method
|
294 |
-
* @param mixed $instance
|
295 |
-
* @return mixed
|
296 |
-
*/
|
297 |
-
public function callMethodBinding($method, $instance)
|
298 |
-
{
|
299 |
-
return \call_user_func($this->methodBindings[$method], $instance, $this);
|
300 |
-
}
|
301 |
-
/**
|
302 |
-
* Add a contextual binding to the container.
|
303 |
-
*
|
304 |
-
* @param string $concrete
|
305 |
-
* @param string $abstract
|
306 |
-
* @param \Closure|string $implementation
|
307 |
-
* @return void
|
308 |
-
*/
|
309 |
-
public function addContextualBinding($concrete, $abstract, $implementation)
|
310 |
-
{
|
311 |
-
$this->contextual[$concrete][$this->getAlias($abstract)] = $implementation;
|
312 |
-
}
|
313 |
-
/**
|
314 |
-
* Register a binding if it hasn't already been registered.
|
315 |
-
*
|
316 |
-
* @param string $abstract
|
317 |
-
* @param \Closure|string|null $concrete
|
318 |
-
* @param bool $shared
|
319 |
-
* @return void
|
320 |
-
*/
|
321 |
-
public function bindIf($abstract, $concrete = null, $shared = \false)
|
322 |
-
{
|
323 |
-
if (!$this->bound($abstract)) {
|
324 |
-
$this->bind($abstract, $concrete, $shared);
|
325 |
-
}
|
326 |
-
}
|
327 |
-
/**
|
328 |
-
* Register a shared binding in the container.
|
329 |
-
*
|
330 |
-
* @param string $abstract
|
331 |
-
* @param \Closure|string|null $concrete
|
332 |
-
* @return void
|
333 |
-
*/
|
334 |
-
public function singleton($abstract, $concrete = null)
|
335 |
-
{
|
336 |
-
$this->bind($abstract, $concrete, \true);
|
337 |
-
}
|
338 |
-
/**
|
339 |
-
* Register a shared binding if it hasn't already been registered.
|
340 |
-
*
|
341 |
-
* @param string $abstract
|
342 |
-
* @param \Closure|string|null $concrete
|
343 |
-
* @return void
|
344 |
-
*/
|
345 |
-
public function singletonIf($abstract, $concrete = null)
|
346 |
-
{
|
347 |
-
if (!$this->bound($abstract)) {
|
348 |
-
$this->singleton($abstract, $concrete);
|
349 |
-
}
|
350 |
-
}
|
351 |
-
/**
|
352 |
-
* Register a scoped binding in the container.
|
353 |
-
*
|
354 |
-
* @param string $abstract
|
355 |
-
* @param \Closure|string|null $concrete
|
356 |
-
* @return void
|
357 |
-
*/
|
358 |
-
public function scoped($abstract, $concrete = null)
|
359 |
-
{
|
360 |
-
$this->scopedInstances[] = $abstract;
|
361 |
-
$this->singleton($abstract, $concrete);
|
362 |
-
}
|
363 |
-
/**
|
364 |
-
* Register a scoped binding if it hasn't already been registered.
|
365 |
-
*
|
366 |
-
* @param string $abstract
|
367 |
-
* @param \Closure|string|null $concrete
|
368 |
-
* @return void
|
369 |
-
*/
|
370 |
-
public function scopedIf($abstract, $concrete = null)
|
371 |
-
{
|
372 |
-
if (!$this->bound($abstract)) {
|
373 |
-
$this->scopedInstances[] = $abstract;
|
374 |
-
$this->singleton($abstract, $concrete);
|
375 |
-
}
|
376 |
-
}
|
377 |
-
/**
|
378 |
-
* "Extend" an abstract type in the container.
|
379 |
-
*
|
380 |
-
* @param string $abstract
|
381 |
-
* @param \Closure $closure
|
382 |
-
* @return void
|
383 |
-
*
|
384 |
-
* @throws \InvalidArgumentException
|
385 |
-
*/
|
386 |
-
public function extend($abstract, Closure $closure)
|
387 |
-
{
|
388 |
-
$abstract = $this->getAlias($abstract);
|
389 |
-
if (isset($this->instances[$abstract])) {
|
390 |
-
$this->instances[$abstract] = $closure($this->instances[$abstract], $this);
|
391 |
-
$this->rebound($abstract);
|
392 |
-
} else {
|
393 |
-
$this->extenders[$abstract][] = $closure;
|
394 |
-
if ($this->resolved($abstract)) {
|
395 |
-
$this->rebound($abstract);
|
396 |
-
}
|
397 |
-
}
|
398 |
-
}
|
399 |
-
/**
|
400 |
-
* Register an existing instance as shared in the container.
|
401 |
-
*
|
402 |
-
* @param string $abstract
|
403 |
-
* @param mixed $instance
|
404 |
-
* @return mixed
|
405 |
-
*/
|
406 |
-
public function instance($abstract, $instance)
|
407 |
-
{
|
408 |
-
$this->removeAbstractAlias($abstract);
|
409 |
-
$isBound = $this->bound($abstract);
|
410 |
-
unset($this->aliases[$abstract]);
|
411 |
-
// We'll check to determine if this type has been bound before, and if it has
|
412 |
-
// we will fire the rebound callbacks registered with the container and it
|
413 |
-
// can be updated with consuming classes that have gotten resolved here.
|
414 |
-
$this->instances[$abstract] = $instance;
|
415 |
-
if ($isBound) {
|
416 |
-
$this->rebound($abstract);
|
417 |
-
}
|
418 |
-
return $instance;
|
419 |
-
}
|
420 |
-
/**
|
421 |
-
* Remove an alias from the contextual binding alias cache.
|
422 |
-
*
|
423 |
-
* @param string $searched
|
424 |
-
* @return void
|
425 |
-
*/
|
426 |
-
protected function removeAbstractAlias($searched)
|
427 |
-
{
|
428 |
-
if (!isset($this->aliases[$searched])) {
|
429 |
-
return;
|
430 |
-
}
|
431 |
-
foreach ($this->abstractAliases as $abstract => $aliases) {
|
432 |
-
foreach ($aliases as $index => $alias) {
|
433 |
-
if ($alias == $searched) {
|
434 |
-
unset($this->abstractAliases[$abstract][$index]);
|
435 |
-
}
|
436 |
-
}
|
437 |
-
}
|
438 |
-
}
|
439 |
-
/**
|
440 |
-
* Assign a set of tags to a given binding.
|
441 |
-
*
|
442 |
-
* @param array|string $abstracts
|
443 |
-
* @param array|mixed ...$tags
|
444 |
-
* @return void
|
445 |
-
*/
|
446 |
-
public function tag($abstracts, $tags)
|
447 |
-
{
|
448 |
-
$tags = \is_array($tags) ? $tags : \array_slice(\func_get_args(), 1);
|
449 |
-
foreach ($tags as $tag) {
|
450 |
-
if (!isset($this->tags[$tag])) {
|
451 |
-
$this->tags[$tag] = [];
|
452 |
-
}
|
453 |
-
foreach ((array) $abstracts as $abstract) {
|
454 |
-
$this->tags[$tag][] = $abstract;
|
455 |
-
}
|
456 |
-
}
|
457 |
-
}
|
458 |
-
/**
|
459 |
-
* Resolve all of the bindings for a given tag.
|
460 |
-
*
|
461 |
-
* @param string $tag
|
462 |
-
* @return iterable
|
463 |
-
*/
|
464 |
-
public function tagged($tag)
|
465 |
-
{
|
466 |
-
if (!isset($this->tags[$tag])) {
|
467 |
-
return [];
|
468 |
-
}
|
469 |
-
return new RewindableGenerator(function () use($tag) {
|
470 |
-
foreach ($this->tags[$tag] as $abstract) {
|
471 |
-
(yield $this->make($abstract));
|
472 |
-
}
|
473 |
-
}, \count($this->tags[$tag]));
|
474 |
-
}
|
475 |
-
/**
|
476 |
-
* Alias a type to a different name.
|
477 |
-
*
|
478 |
-
* @param string $abstract
|
479 |
-
* @param string $alias
|
480 |
-
* @return void
|
481 |
-
*
|
482 |
-
* @throws \LogicException
|
483 |
-
*/
|
484 |
-
public function alias($abstract, $alias)
|
485 |
-
{
|
486 |
-
if ($alias === $abstract) {
|
487 |
-
throw new LogicException("[{$abstract}] is aliased to itself.");
|
488 |
-
}
|
489 |
-
$this->aliases[$alias] = $abstract;
|
490 |
-
$this->abstractAliases[$abstract][] = $alias;
|
491 |
-
}
|
492 |
-
/**
|
493 |
-
* Bind a new callback to an abstract's rebind event.
|
494 |
-
*
|
495 |
-
* @param string $abstract
|
496 |
-
* @param \Closure $callback
|
497 |
-
* @return mixed
|
498 |
-
*/
|
499 |
-
public function rebinding($abstract, Closure $callback)
|
500 |
-
{
|
501 |
-
$this->reboundCallbacks[$abstract = $this->getAlias($abstract)][] = $callback;
|
502 |
-
if ($this->bound($abstract)) {
|
503 |
-
return $this->make($abstract);
|
504 |
-
}
|
505 |
-
}
|
506 |
-
/**
|
507 |
-
* Refresh an instance on the given target and method.
|
508 |
-
*
|
509 |
-
* @param string $abstract
|
510 |
-
* @param mixed $target
|
511 |
-
* @param string $method
|
512 |
-
* @return mixed
|
513 |
-
*/
|
514 |
-
public function refresh($abstract, $target, $method)
|
515 |
-
{
|
516 |
-
return $this->rebinding($abstract, function ($app, $instance) use($target, $method) {
|
517 |
-
$target->{$method}($instance);
|
518 |
-
});
|
519 |
-
}
|
520 |
-
/**
|
521 |
-
* Fire the "rebound" callbacks for the given abstract type.
|
522 |
-
*
|
523 |
-
* @param string $abstract
|
524 |
-
* @return void
|
525 |
-
*/
|
526 |
-
protected function rebound($abstract)
|
527 |
-
{
|
528 |
-
$instance = $this->make($abstract);
|
529 |
-
foreach ($this->getReboundCallbacks($abstract) as $callback) {
|
530 |
-
\call_user_func($callback, $this, $instance);
|
531 |
-
}
|
532 |
-
}
|
533 |
-
/**
|
534 |
-
* Get the rebound callbacks for a given type.
|
535 |
-
*
|
536 |
-
* @param string $abstract
|
537 |
-
* @return array
|
538 |
-
*/
|
539 |
-
protected function getReboundCallbacks($abstract)
|
540 |
-
{
|
541 |
-
return $this->reboundCallbacks[$abstract] ?? [];
|
542 |
-
}
|
543 |
-
/**
|
544 |
-
* Wrap the given closure such that its dependencies will be injected when executed.
|
545 |
-
*
|
546 |
-
* @param \Closure $callback
|
547 |
-
* @param array $parameters
|
548 |
-
* @return \Closure
|
549 |
-
*/
|
550 |
-
public function wrap(Closure $callback, array $parameters = [])
|
551 |
-
{
|
552 |
-
return function () use($callback, $parameters) {
|
553 |
-
return $this->call($callback, $parameters);
|
554 |
-
};
|
555 |
-
}
|
556 |
-
/**
|
557 |
-
* Call the given Closure / class@method and inject its dependencies.
|
558 |
-
*
|
559 |
-
* @param callable|string $callback
|
560 |
-
* @param array<string, mixed> $parameters
|
561 |
-
* @param string|null $defaultMethod
|
562 |
-
* @return mixed
|
563 |
-
*
|
564 |
-
* @throws \InvalidArgumentException
|
565 |
-
*/
|
566 |
-
public function call($callback, array $parameters = [], $defaultMethod = null)
|
567 |
-
{
|
568 |
-
return BoundMethod::call($this, $callback, $parameters, $defaultMethod);
|
569 |
-
}
|
570 |
-
/**
|
571 |
-
* Get a closure to resolve the given type from the container.
|
572 |
-
*
|
573 |
-
* @param string $abstract
|
574 |
-
* @return \Closure
|
575 |
-
*/
|
576 |
-
public function factory($abstract)
|
577 |
-
{
|
578 |
-
return function () use($abstract) {
|
579 |
-
return $this->make($abstract);
|
580 |
-
};
|
581 |
-
}
|
582 |
-
/**
|
583 |
-
* An alias function name for make().
|
584 |
-
*
|
585 |
-
* @param string|callable $abstract
|
586 |
-
* @param array $parameters
|
587 |
-
* @return mixed
|
588 |
-
*
|
589 |
-
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
590 |
-
*/
|
591 |
-
public function makeWith($abstract, array $parameters = [])
|
592 |
-
{
|
593 |
-
return $this->make($abstract, $parameters);
|
594 |
-
}
|
595 |
-
/**
|
596 |
-
* Resolve the given type from the container.
|
597 |
-
*
|
598 |
-
* @param string|callable $abstract
|
599 |
-
* @param array $parameters
|
600 |
-
* @return mixed
|
601 |
-
*
|
602 |
-
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
603 |
-
*/
|
604 |
-
public function make($abstract, array $parameters = [])
|
605 |
-
{
|
606 |
-
return $this->resolve($abstract, $parameters);
|
607 |
-
}
|
608 |
-
/**
|
609 |
-
* {@inheritdoc}
|
610 |
-
*
|
611 |
-
* @return mixed
|
612 |
-
*/
|
613 |
-
public function get($id)
|
614 |
-
{
|
615 |
-
try {
|
616 |
-
return $this->resolve($id);
|
617 |
-
} catch (Exception $e) {
|
618 |
-
if ($this->has($id) || $e instanceof CircularDependencyException) {
|
619 |
-
throw $e;
|
620 |
-
}
|
621 |
-
throw new EntryNotFoundException($id, $e->getCode(), $e);
|
622 |
-
}
|
623 |
-
}
|
624 |
-
/**
|
625 |
-
* Resolve the given type from the container.
|
626 |
-
*
|
627 |
-
* @param string|callable $abstract
|
628 |
-
* @param array $parameters
|
629 |
-
* @param bool $raiseEvents
|
630 |
-
* @return mixed
|
631 |
-
*
|
632 |
-
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
633 |
-
* @throws \Illuminate\Contracts\Container\CircularDependencyException
|
634 |
-
*/
|
635 |
-
protected function resolve($abstract, $parameters = [], $raiseEvents = \true)
|
636 |
-
{
|
637 |
-
$abstract = $this->getAlias($abstract);
|
638 |
-
// First we'll fire any event handlers which handle the "before" resolving of
|
639 |
-
// specific types. This gives some hooks the chance to add various extends
|
640 |
-
// calls to change the resolution of objects that they're interested in.
|
641 |
-
if ($raiseEvents) {
|
642 |
-
$this->fireBeforeResolvingCallbacks($abstract, $parameters);
|
643 |
-
}
|
644 |
-
$concrete = $this->getContextualConcrete($abstract);
|
645 |
-
$needsContextualBuild = !empty($parameters) || !\is_null($concrete);
|
646 |
-
// If an instance of the type is currently being managed as a singleton we'll
|
647 |
-
// just return an existing instance instead of instantiating new instances
|
648 |
-
// so the developer can keep using the same objects instance every time.
|
649 |
-
if (isset($this->instances[$abstract]) && !$needsContextualBuild) {
|
650 |
-
return $this->instances[$abstract];
|
651 |
-
}
|
652 |
-
$this->with[] = $parameters;
|
653 |
-
if (\is_null($concrete)) {
|
654 |
-
$concrete = $this->getConcrete($abstract);
|
655 |
-
}
|
656 |
-
// We're ready to instantiate an instance of the concrete type registered for
|
657 |
-
// the binding. This will instantiate the types, as well as resolve any of
|
658 |
-
// its "nested" dependencies recursively until all have gotten resolved.
|
659 |
-
if ($this->isBuildable($concrete, $abstract)) {
|
660 |
-
$object = $this->build($concrete);
|
661 |
-
} else {
|
662 |
-
$object = $this->make($concrete);
|
663 |
-
}
|
664 |
-
// If we defined any extenders for this type, we'll need to spin through them
|
665 |
-
// and apply them to the object being built. This allows for the extension
|
666 |
-
// of services, such as changing configuration or decorating the object.
|
667 |
-
foreach ($this->getExtenders($abstract) as $extender) {
|
668 |
-
$object = $extender($object, $this);
|
669 |
-
}
|
670 |
-
// If the requested type is registered as a singleton we'll want to cache off
|
671 |
-
// the instances in "memory" so we can return it later without creating an
|
672 |
-
// entirely new instance of an object on each subsequent request for it.
|
673 |
-
if ($this->isShared($abstract) && !$needsContextualBuild) {
|
674 |
-
$this->instances[$abstract] = $object;
|
675 |
-
}
|
676 |
-
if ($raiseEvents) {
|
677 |
-
$this->fireResolvingCallbacks($abstract, $object);
|
678 |
-
}
|
679 |
-
// Before returning, we will also set the resolved flag to "true" and pop off
|
680 |
-
// the parameter overrides for this build. After those two things are done
|
681 |
-
// we will be ready to return back the fully constructed class instance.
|
682 |
-
$this->resolved[$abstract] = \true;
|
683 |
-
\array_pop($this->with);
|
684 |
-
return $object;
|
685 |
-
}
|
686 |
-
/**
|
687 |
-
* Get the concrete type for a given abstract.
|
688 |
-
*
|
689 |
-
* @param string|callable $abstract
|
690 |
-
* @return mixed
|
691 |
-
*/
|
692 |
-
protected function getConcrete($abstract)
|
693 |
-
{
|
694 |
-
// If we don't have a registered resolver or concrete for the type, we'll just
|
695 |
-
// assume each type is a concrete name and will attempt to resolve it as is
|
696 |
-
// since the container should be able to resolve concretes automatically.
|
697 |
-
if (isset($this->bindings[$abstract])) {
|
698 |
-
return $this->bindings[$abstract]['concrete'];
|
699 |
-
}
|
700 |
-
return $abstract;
|
701 |
-
}
|
702 |
-
/**
|
703 |
-
* Get the contextual concrete binding for the given abstract.
|
704 |
-
*
|
705 |
-
* @param string|callable $abstract
|
706 |
-
* @return \Closure|string|array|null
|
707 |
-
*/
|
708 |
-
protected function getContextualConcrete($abstract)
|
709 |
-
{
|
710 |
-
if (!\is_null($binding = $this->findInContextualBindings($abstract))) {
|
711 |
-
return $binding;
|
712 |
-
}
|
713 |
-
// Next we need to see if a contextual binding might be bound under an alias of the
|
714 |
-
// given abstract type. So, we will need to check if any aliases exist with this
|
715 |
-
// type and then spin through them and check for contextual bindings on these.
|
716 |
-
if (empty($this->abstractAliases[$abstract])) {
|
717 |
-
return;
|
718 |
-
}
|
719 |
-
foreach ($this->abstractAliases[$abstract] as $alias) {
|
720 |
-
if (!\is_null($binding = $this->findInContextualBindings($alias))) {
|
721 |
-
return $binding;
|
722 |
-
}
|
723 |
-
}
|
724 |
-
}
|
725 |
-
/**
|
726 |
-
* Find the concrete binding for the given abstract in the contextual binding array.
|
727 |
-
*
|
728 |
-
* @param string|callable $abstract
|
729 |
-
* @return \Closure|string|null
|
730 |
-
*/
|
731 |
-
protected function findInContextualBindings($abstract)
|
732 |
-
{
|
733 |
-
return $this->contextual[\end($this->buildStack)][$abstract] ?? null;
|
734 |
-
}
|
735 |
-
/**
|
736 |
-
* Determine if the given concrete is buildable.
|
737 |
-
*
|
738 |
-
* @param mixed $concrete
|
739 |
-
* @param string $abstract
|
740 |
-
* @return bool
|
741 |
-
*/
|
742 |
-
protected function isBuildable($concrete, $abstract)
|
743 |
-
{
|
744 |
-
return $concrete === $abstract || $concrete instanceof Closure;
|
745 |
-
}
|
746 |
-
/**
|
747 |
-
* Instantiate a concrete instance of the given type.
|
748 |
-
*
|
749 |
-
* @param \Closure|string $concrete
|
750 |
-
* @return mixed
|
751 |
-
*
|
752 |
-
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
753 |
-
* @throws \Illuminate\Contracts\Container\CircularDependencyException
|
754 |
-
*/
|
755 |
-
public function build($concrete)
|
756 |
-
{
|
757 |
-
// If the concrete type is actually a Closure, we will just execute it and
|
758 |
-
// hand back the results of the functions, which allows functions to be
|
759 |
-
// used as resolvers for more fine-tuned resolution of these objects.
|
760 |
-
if ($concrete instanceof Closure) {
|
761 |
-
return $concrete($this, $this->getLastParameterOverride());
|
762 |
-
}
|
763 |
-
try {
|
764 |
-
$reflector = new ReflectionClass($concrete);
|
765 |
-
} catch (ReflectionException $e) {
|
766 |
-
throw new BindingResolutionException("Target class [{$concrete}] does not exist.", 0, $e);
|
767 |
-
}
|
768 |
-
// If the type is not instantiable, the developer is attempting to resolve
|
769 |
-
// an abstract type such as an Interface or Abstract Class and there is
|
770 |
-
// no binding registered for the abstractions so we need to bail out.
|
771 |
-
if (!$reflector->isInstantiable()) {
|
772 |
-
return $this->notInstantiable($concrete);
|
773 |
-
}
|
774 |
-
// if (in_array($concrete, $this->buildStack)) {
|
775 |
-
// throw new CircularDependencyException("Circular dependency detected while resolving [{$concrete}].");
|
776 |
-
// }
|
777 |
-
$this->buildStack[] = $concrete;
|
778 |
-
$constructor = $reflector->getConstructor();
|
779 |
-
// If there are no constructors, that means there are no dependencies then
|
780 |
-
// we can just resolve the instances of the objects right away, without
|
781 |
-
// resolving any other types or dependencies out of these containers.
|
782 |
-
if (\is_null($constructor)) {
|
783 |
-
\array_pop($this->buildStack);
|
784 |
-
return new $concrete();
|
785 |
-
}
|
786 |
-
$dependencies = $constructor->getParameters();
|
787 |
-
// Once we have all the constructor's parameters we can create each of the
|
788 |
-
// dependency instances and then use the reflection instances to make a
|
789 |
-
// new instance of this class, injecting the created dependencies in.
|
790 |
-
try {
|
791 |
-
$instances = $this->resolveDependencies($dependencies);
|
792 |
-
} catch (BindingResolutionException $e) {
|
793 |
-
\array_pop($this->buildStack);
|
794 |
-
throw $e;
|
795 |
-
}
|
796 |
-
\array_pop($this->buildStack);
|
797 |
-
return $reflector->newInstanceArgs($instances);
|
798 |
-
}
|
799 |
-
/**
|
800 |
-
* Resolve all of the dependencies from the ReflectionParameters.
|
801 |
-
*
|
802 |
-
* @param \ReflectionParameter[] $dependencies
|
803 |
-
* @return array
|
804 |
-
*
|
805 |
-
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
806 |
-
*/
|
807 |
-
protected function resolveDependencies(array $dependencies)
|
808 |
-
{
|
809 |
-
$results = [];
|
810 |
-
foreach ($dependencies as $dependency) {
|
811 |
-
// If the dependency has an override for this particular build we will use
|
812 |
-
// that instead as the value. Otherwise, we will continue with this run
|
813 |
-
// of resolutions and let reflection attempt to determine the result.
|
814 |
-
if ($this->hasParameterOverride($dependency)) {
|
815 |
-
$results[] = $this->getParameterOverride($dependency);
|
816 |
-
continue;
|
817 |
-
}
|
818 |
-
// If the class is null, it means the dependency is a string or some other
|
819 |
-
// primitive type which we can not resolve since it is not a class and
|
820 |
-
// we will just bomb out with an error since we have no-where to go.
|
821 |
-
$result = \is_null(Util::getParameterClassName($dependency)) ? $this->resolvePrimitive($dependency) : $this->resolveClass($dependency);
|
822 |
-
if ($dependency->isVariadic()) {
|
823 |
-
$results = \array_merge($results, $result);
|
824 |
-
} else {
|
825 |
-
$results[] = $result;
|
826 |
-
}
|
827 |
-
}
|
828 |
-
return $results;
|
829 |
-
}
|
830 |
-
/**
|
831 |
-
* Determine if the given dependency has a parameter override.
|
832 |
-
*
|
833 |
-
* @param \ReflectionParameter $dependency
|
834 |
-
* @return bool
|
835 |
-
*/
|
836 |
-
protected function hasParameterOverride($dependency)
|
837 |
-
{
|
838 |
-
return \array_key_exists($dependency->name, $this->getLastParameterOverride());
|
839 |
-
}
|
840 |
-
/**
|
841 |
-
* Get a parameter override for a dependency.
|
842 |
-
*
|
843 |
-
* @param \ReflectionParameter $dependency
|
844 |
-
* @return mixed
|
845 |
-
*/
|
846 |
-
protected function getParameterOverride($dependency)
|
847 |
-
{
|
848 |
-
return $this->getLastParameterOverride()[$dependency->name];
|
849 |
-
}
|
850 |
-
/**
|
851 |
-
* Get the last parameter override.
|
852 |
-
*
|
853 |
-
* @return array
|
854 |
-
*/
|
855 |
-
protected function getLastParameterOverride()
|
856 |
-
{
|
857 |
-
return \count($this->with) ? \end($this->with) : [];
|
858 |
-
}
|
859 |
-
/**
|
860 |
-
* Resolve a non-class hinted primitive dependency.
|
861 |
-
*
|
862 |
-
* @param \ReflectionParameter $parameter
|
863 |
-
* @return mixed
|
864 |
-
*
|
865 |
-
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
866 |
-
*/
|
867 |
-
protected function resolvePrimitive(ReflectionParameter $parameter)
|
868 |
-
{
|
869 |
-
if (!\is_null($concrete = $this->getContextualConcrete('$' . $parameter->getName()))) {
|
870 |
-
return $concrete instanceof Closure ? $concrete($this) : $concrete;
|
871 |
-
}
|
872 |
-
if ($parameter->isDefaultValueAvailable()) {
|
873 |
-
return $parameter->getDefaultValue();
|
874 |
-
}
|
875 |
-
$this->unresolvablePrimitive($parameter);
|
876 |
-
}
|
877 |
-
/**
|
878 |
-
* Resolve a class based dependency from the container.
|
879 |
-
*
|
880 |
-
* @param \ReflectionParameter $parameter
|
881 |
-
* @return mixed
|
882 |
-
*
|
883 |
-
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
884 |
-
*/
|
885 |
-
protected function resolveClass(ReflectionParameter $parameter)
|
886 |
-
{
|
887 |
-
try {
|
888 |
-
return $parameter->isVariadic() ? $this->resolveVariadicClass($parameter) : $this->make(Util::getParameterClassName($parameter));
|
889 |
-
} catch (BindingResolutionException $e) {
|
890 |
-
if ($parameter->isDefaultValueAvailable()) {
|
891 |
-
\array_pop($this->with);
|
892 |
-
return $parameter->getDefaultValue();
|
893 |
-
}
|
894 |
-
if ($parameter->isVariadic()) {
|
895 |
-
\array_pop($this->with);
|
896 |
-
return [];
|
897 |
-
}
|
898 |
-
throw $e;
|
899 |
-
}
|
900 |
-
}
|
901 |
-
/**
|
902 |
-
* Resolve a class based variadic dependency from the container.
|
903 |
-
*
|
904 |
-
* @param \ReflectionParameter $parameter
|
905 |
-
* @return mixed
|
906 |
-
*/
|
907 |
-
protected function resolveVariadicClass(ReflectionParameter $parameter)
|
908 |
-
{
|
909 |
-
$className = Util::getParameterClassName($parameter);
|
910 |
-
$abstract = $this->getAlias($className);
|
911 |
-
if (!\is_array($concrete = $this->getContextualConcrete($abstract))) {
|
912 |
-
return $this->make($className);
|
913 |
-
}
|
914 |
-
return \array_map(function ($abstract) {
|
915 |
-
return $this->resolve($abstract);
|
916 |
-
}, $concrete);
|
917 |
-
}
|
918 |
-
/**
|
919 |
-
* Throw an exception that the concrete is not instantiable.
|
920 |
-
*
|
921 |
-
* @param string $concrete
|
922 |
-
* @return void
|
923 |
-
*
|
924 |
-
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
925 |
-
*/
|
926 |
-
protected function notInstantiable($concrete)
|
927 |
-
{
|
928 |
-
if (!empty($this->buildStack)) {
|
929 |
-
$previous = \implode(', ', $this->buildStack);
|
930 |
-
$message = "Target [{$concrete}] is not instantiable while building [{$previous}].";
|
931 |
-
} else {
|
932 |
-
$message = "Target [{$concrete}] is not instantiable.";
|
933 |
-
}
|
934 |
-
throw new BindingResolutionException($message);
|
935 |
-
}
|
936 |
-
/**
|
937 |
-
* Throw an exception for an unresolvable primitive.
|
938 |
-
*
|
939 |
-
* @param \ReflectionParameter $parameter
|
940 |
-
* @return void
|
941 |
-
*
|
942 |
-
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
943 |
-
*/
|
944 |
-
protected function unresolvablePrimitive(ReflectionParameter $parameter)
|
945 |
-
{
|
946 |
-
$message = "Unresolvable dependency resolving [{$parameter}] in class {$parameter->getDeclaringClass()->getName()}";
|
947 |
-
throw new BindingResolutionException($message);
|
948 |
-
}
|
949 |
-
/**
|
950 |
-
* Register a new before resolving callback for all types.
|
951 |
-
*
|
952 |
-
* @param \Closure|string $abstract
|
953 |
-
* @param \Closure|null $callback
|
954 |
-
* @return void
|
955 |
-
*/
|
956 |
-
public function beforeResolving($abstract, Closure $callback = null)
|
957 |
-
{
|
958 |
-
if (\is_string($abstract)) {
|
959 |
-
$abstract = $this->getAlias($abstract);
|
960 |
-
}
|
961 |
-
if ($abstract instanceof Closure && \is_null($callback)) {
|
962 |
-
$this->globalBeforeResolvingCallbacks[] = $abstract;
|
963 |
-
} else {
|
964 |
-
$this->beforeResolvingCallbacks[$abstract][] = $callback;
|
965 |
-
}
|
966 |
-
}
|
967 |
-
/**
|
968 |
-
* Register a new resolving callback.
|
969 |
-
*
|
970 |
-
* @param \Closure|string $abstract
|
971 |
-
* @param \Closure|null $callback
|
972 |
-
* @return void
|
973 |
-
*/
|
974 |
-
public function resolving($abstract, Closure $callback = null)
|
975 |
-
{
|
976 |
-
if (\is_string($abstract)) {
|
977 |
-
$abstract = $this->getAlias($abstract);
|
978 |
-
}
|
979 |
-
if (\is_null($callback) && $abstract instanceof Closure) {
|
980 |
-
$this->globalResolvingCallbacks[] = $abstract;
|
981 |
-
} else {
|
982 |
-
$this->resolvingCallbacks[$abstract][] = $callback;
|
983 |
-
}
|
984 |
-
}
|
985 |
-
/**
|
986 |
-
* Register a new after resolving callback for all types.
|
987 |
-
*
|
988 |
-
* @param \Closure|string $abstract
|
989 |
-
* @param \Closure|null $callback
|
990 |
-
* @return void
|
991 |
-
*/
|
992 |
-
public function afterResolving($abstract, Closure $callback = null)
|
993 |
-
{
|
994 |
-
if (\is_string($abstract)) {
|
995 |
-
$abstract = $this->getAlias($abstract);
|
996 |
-
}
|
997 |
-
if ($abstract instanceof Closure && \is_null($callback)) {
|
998 |
-
$this->globalAfterResolvingCallbacks[] = $abstract;
|
999 |
-
} else {
|
1000 |
-
$this->afterResolvingCallbacks[$abstract][] = $callback;
|
1001 |
-
}
|
1002 |
-
}
|
1003 |
-
/**
|
1004 |
-
* Fire all of the before resolving callbacks.
|
1005 |
-
*
|
1006 |
-
* @param string $abstract
|
1007 |
-
* @param array $parameters
|
1008 |
-
* @return void
|
1009 |
-
*/
|
1010 |
-
protected function fireBeforeResolvingCallbacks($abstract, $parameters = [])
|
1011 |
-
{
|
1012 |
-
$this->fireBeforeCallbackArray($abstract, $parameters, $this->globalBeforeResolvingCallbacks);
|
1013 |
-
foreach ($this->beforeResolvingCallbacks as $type => $callbacks) {
|
1014 |
-
if ($type === $abstract || \is_subclass_of($abstract, $type)) {
|
1015 |
-
$this->fireBeforeCallbackArray($abstract, $parameters, $callbacks);
|
1016 |
-
}
|
1017 |
-
}
|
1018 |
-
}
|
1019 |
-
/**
|
1020 |
-
* Fire an array of callbacks with an object.
|
1021 |
-
*
|
1022 |
-
* @param string $abstract
|
1023 |
-
* @param array $parameters
|
1024 |
-
* @param array $callbacks
|
1025 |
-
* @return void
|
1026 |
-
*/
|
1027 |
-
protected function fireBeforeCallbackArray($abstract, $parameters, array $callbacks)
|
1028 |
-
{
|
1029 |
-
foreach ($callbacks as $callback) {
|
1030 |
-
$callback($abstract, $parameters, $this);
|
1031 |
-
}
|
1032 |
-
}
|
1033 |
-
/**
|
1034 |
-
* Fire all of the resolving callbacks.
|
1035 |
-
*
|
1036 |
-
* @param string $abstract
|
1037 |
-
* @param mixed $object
|
1038 |
-
* @return void
|
1039 |
-
*/
|
1040 |
-
protected function fireResolvingCallbacks($abstract, $object)
|
1041 |
-
{
|
1042 |
-
$this->fireCallbackArray($object, $this->globalResolvingCallbacks);
|
1043 |
-
$this->fireCallbackArray($object, $this->getCallbacksForType($abstract, $object, $this->resolvingCallbacks));
|
1044 |
-
$this->fireAfterResolvingCallbacks($abstract, $object);
|
1045 |
-
}
|
1046 |
-
/**
|
1047 |
-
* Fire all of the after resolving callbacks.
|
1048 |
-
*
|
1049 |
-
* @param string $abstract
|
1050 |
-
* @param mixed $object
|
1051 |
-
* @return void
|
1052 |
-
*/
|
1053 |
-
protected function fireAfterResolvingCallbacks($abstract, $object)
|
1054 |
-
{
|
1055 |
-
$this->fireCallbackArray($object, $this->globalAfterResolvingCallbacks);
|
1056 |
-
$this->fireCallbackArray($object, $this->getCallbacksForType($abstract, $object, $this->afterResolvingCallbacks));
|
1057 |
-
}
|
1058 |
-
/**
|
1059 |
-
* Get all callbacks for a given type.
|
1060 |
-
*
|
1061 |
-
* @param string $abstract
|
1062 |
-
* @param object $object
|
1063 |
-
* @param array $callbacksPerType
|
1064 |
-
* @return array
|
1065 |
-
*/
|
1066 |
-
protected function getCallbacksForType($abstract, $object, array $callbacksPerType)
|
1067 |
-
{
|
1068 |
-
$results = [];
|
1069 |
-
foreach ($callbacksPerType as $type => $callbacks) {
|
1070 |
-
if ($type === $abstract || $object instanceof $type) {
|
1071 |
-
$results = \array_merge($results, $callbacks);
|
1072 |
-
}
|
1073 |
-
}
|
1074 |
-
return $results;
|
1075 |
-
}
|
1076 |
-
/**
|
1077 |
-
* Fire an array of callbacks with an object.
|
1078 |
-
*
|
1079 |
-
* @param mixed $object
|
1080 |
-
* @param array $callbacks
|
1081 |
-
* @return void
|
1082 |
-
*/
|
1083 |
-
protected function fireCallbackArray($object, array $callbacks)
|
1084 |
-
{
|
1085 |
-
foreach ($callbacks as $callback) {
|
1086 |
-
$callback($object, $this);
|
1087 |
-
}
|
1088 |
-
}
|
1089 |
-
/**
|
1090 |
-
* Get the container's bindings.
|
1091 |
-
*
|
1092 |
-
* @return array
|
1093 |
-
*/
|
1094 |
-
public function getBindings()
|
1095 |
-
{
|
1096 |
-
return $this->bindings;
|
1097 |
-
}
|
1098 |
-
/**
|
1099 |
-
* Get the alias for an abstract if available.
|
1100 |
-
*
|
1101 |
-
* @param string $abstract
|
1102 |
-
* @return string
|
1103 |
-
*/
|
1104 |
-
public function getAlias($abstract)
|
1105 |
-
{
|
1106 |
-
return isset($this->aliases[$abstract]) ? $this->getAlias($this->aliases[$abstract]) : $abstract;
|
1107 |
-
}
|
1108 |
-
/**
|
1109 |
-
* Get the extender callbacks for a given type.
|
1110 |
-
*
|
1111 |
-
* @param string $abstract
|
1112 |
-
* @return array
|
1113 |
-
*/
|
1114 |
-
protected function getExtenders($abstract)
|
1115 |
-
{
|
1116 |
-
return $this->extenders[$this->getAlias($abstract)] ?? [];
|
1117 |
-
}
|
1118 |
-
/**
|
1119 |
-
* Remove all of the extender callbacks for a given type.
|
1120 |
-
*
|
1121 |
-
* @param string $abstract
|
1122 |
-
* @return void
|
1123 |
-
*/
|
1124 |
-
public function forgetExtenders($abstract)
|
1125 |
-
{
|
1126 |
-
unset($this->extenders[$this->getAlias($abstract)]);
|
1127 |
-
}
|
1128 |
-
/**
|
1129 |
-
* Drop all of the stale instances and aliases.
|
1130 |
-
*
|
1131 |
-
* @param string $abstract
|
1132 |
-
* @return void
|
1133 |
-
*/
|
1134 |
-
protected function dropStaleInstances($abstract)
|
1135 |
-
{
|
1136 |
-
unset($this->instances[$abstract], $this->aliases[$abstract]);
|
1137 |
-
}
|
1138 |
-
/**
|
1139 |
-
* Remove a resolved instance from the instance cache.
|
1140 |
-
*
|
1141 |
-
* @param string $abstract
|
1142 |
-
* @return void
|
1143 |
-
*/
|
1144 |
-
public function forgetInstance($abstract)
|
1145 |
-
{
|
1146 |
-
unset($this->instances[$abstract]);
|
1147 |
-
}
|
1148 |
-
/**
|
1149 |
-
* Clear all of the instances from the container.
|
1150 |
-
*
|
1151 |
-
* @return void
|
1152 |
-
*/
|
1153 |
-
public function forgetInstances()
|
1154 |
-
{
|
1155 |
-
$this->instances = [];
|
1156 |
-
}
|
1157 |
-
/**
|
1158 |
-
* Clear all of the scoped instances from the container.
|
1159 |
-
*
|
1160 |
-
* @return void
|
1161 |
-
*/
|
1162 |
-
public function forgetScopedInstances()
|
1163 |
-
{
|
1164 |
-
foreach ($this->scopedInstances as $scoped) {
|
1165 |
-
unset($this->instances[$scoped]);
|
1166 |
-
}
|
1167 |
-
}
|
1168 |
-
/**
|
1169 |
-
* Flush the container of all bindings and resolved instances.
|
1170 |
-
*
|
1171 |
-
* @return void
|
1172 |
-
*/
|
1173 |
-
public function flush()
|
1174 |
-
{
|
1175 |
-
$this->aliases = [];
|
1176 |
-
$this->resolved = [];
|
1177 |
-
$this->bindings = [];
|
1178 |
-
$this->instances = [];
|
1179 |
-
$this->abstractAliases = [];
|
1180 |
-
$this->scopedInstances = [];
|
1181 |
-
}
|
1182 |
-
/**
|
1183 |
-
* Get the globally available instance of the container.
|
1184 |
-
*
|
1185 |
-
* @return static
|
1186 |
-
*/
|
1187 |
-
public static function getInstance()
|
1188 |
-
{
|
1189 |
-
if (\is_null(static::$instance)) {
|
1190 |
-
static::$instance = new static();
|
1191 |
-
}
|
1192 |
-
return static::$instance;
|
1193 |
-
}
|
1194 |
-
/**
|
1195 |
-
* Set the shared instance of the container.
|
1196 |
-
*
|
1197 |
-
* @param \Illuminate\Contracts\Container\Container|null $container
|
1198 |
-
* @return \Illuminate\Contracts\Container\Container|static
|
1199 |
-
*/
|
1200 |
-
public static function setInstance(ContainerContract $container = null)
|
1201 |
-
{
|
1202 |
-
return static::$instance = $container;
|
1203 |
-
}
|
1204 |
-
/**
|
1205 |
-
* Determine if a given offset exists.
|
1206 |
-
*
|
1207 |
-
* @param string $key
|
1208 |
-
* @return bool
|
1209 |
-
*/
|
1210 |
-
#[\ReturnTypeWillChange]
|
1211 |
-
public function offsetExists($key)
|
1212 |
-
{
|
1213 |
-
return $this->bound($key);
|
1214 |
-
}
|
1215 |
-
/**
|
1216 |
-
* Get the value at a given offset.
|
1217 |
-
*
|
1218 |
-
* @param string $key
|
1219 |
-
* @return mixed
|
1220 |
-
*/
|
1221 |
-
#[\ReturnTypeWillChange]
|
1222 |
-
public function offsetGet($key)
|
1223 |
-
{
|
1224 |
-
return $this->make($key);
|
1225 |
-
}
|
1226 |
-
/**
|
1227 |
-
* Set the value at a given offset.
|
1228 |
-
*
|
1229 |
-
* @param string $key
|
1230 |
-
* @param mixed $value
|
1231 |
-
* @return void
|
1232 |
-
*/
|
1233 |
-
#[\ReturnTypeWillChange]
|
1234 |
-
public function offsetSet($key, $value)
|
1235 |
-
{
|
1236 |
-
$this->bind($key, $value instanceof Closure ? $value : function () use($value) {
|
1237 |
-
return $value;
|
1238 |
-
});
|
1239 |
-
}
|
1240 |
-
/**
|
1241 |
-
* Unset the value at a given offset.
|
1242 |
-
*
|
1243 |
-
* @param string $key
|
1244 |
-
* @return void
|
1245 |
-
*/
|
1246 |
-
#[\ReturnTypeWillChange]
|
1247 |
-
public function offsetUnset($key)
|
1248 |
-
{
|
1249 |
-
unset($this->bindings[$key], $this->instances[$key], $this->resolved[$key]);
|
1250 |
-
}
|
1251 |
-
/**
|
1252 |
-
* Dynamically access container services.
|
1253 |
-
*
|
1254 |
-
* @param string $key
|
1255 |
-
* @return mixed
|
1256 |
-
*/
|
1257 |
-
public function __get($key)
|
1258 |
-
{
|
1259 |
-
return $this[$key];
|
1260 |
-
}
|
1261 |
-
/**
|
1262 |
-
* Dynamically set container services.
|
1263 |
-
*
|
1264 |
-
* @param string $key
|
1265 |
-
* @param mixed $value
|
1266 |
-
* @return void
|
1267 |
-
*/
|
1268 |
-
public function __set($key, $value)
|
1269 |
-
{
|
1270 |
-
$this[$key] = $value;
|
1271 |
-
}
|
1272 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/container/ContextualBindingBuilder.php
DELETED
@@ -1,88 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Container;
|
4 |
-
|
5 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Container\Container;
|
6 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Container\ContextualBindingBuilder as ContextualBindingBuilderContract;
|
7 |
-
class ContextualBindingBuilder implements ContextualBindingBuilderContract
|
8 |
-
{
|
9 |
-
/**
|
10 |
-
* The underlying container instance.
|
11 |
-
*
|
12 |
-
* @var \Illuminate\Contracts\Container\Container
|
13 |
-
*/
|
14 |
-
protected $container;
|
15 |
-
/**
|
16 |
-
* The concrete instance.
|
17 |
-
*
|
18 |
-
* @var string|array
|
19 |
-
*/
|
20 |
-
protected $concrete;
|
21 |
-
/**
|
22 |
-
* The abstract target.
|
23 |
-
*
|
24 |
-
* @var string
|
25 |
-
*/
|
26 |
-
protected $needs;
|
27 |
-
/**
|
28 |
-
* Create a new contextual binding builder.
|
29 |
-
*
|
30 |
-
* @param \Illuminate\Contracts\Container\Container $container
|
31 |
-
* @param string|array $concrete
|
32 |
-
* @return void
|
33 |
-
*/
|
34 |
-
public function __construct(Container $container, $concrete)
|
35 |
-
{
|
36 |
-
$this->concrete = $concrete;
|
37 |
-
$this->container = $container;
|
38 |
-
}
|
39 |
-
/**
|
40 |
-
* Define the abstract target that depends on the context.
|
41 |
-
*
|
42 |
-
* @param string $abstract
|
43 |
-
* @return $this
|
44 |
-
*/
|
45 |
-
public function needs($abstract)
|
46 |
-
{
|
47 |
-
$this->needs = $abstract;
|
48 |
-
return $this;
|
49 |
-
}
|
50 |
-
/**
|
51 |
-
* Define the implementation for the contextual binding.
|
52 |
-
*
|
53 |
-
* @param \Closure|string|array $implementation
|
54 |
-
* @return void
|
55 |
-
*/
|
56 |
-
public function give($implementation)
|
57 |
-
{
|
58 |
-
foreach (Util::arrayWrap($this->concrete) as $concrete) {
|
59 |
-
$this->container->addContextualBinding($concrete, $this->needs, $implementation);
|
60 |
-
}
|
61 |
-
}
|
62 |
-
/**
|
63 |
-
* Define tagged services to be used as the implementation for the contextual binding.
|
64 |
-
*
|
65 |
-
* @param string $tag
|
66 |
-
* @return void
|
67 |
-
*/
|
68 |
-
public function giveTagged($tag)
|
69 |
-
{
|
70 |
-
$this->give(function ($container) use($tag) {
|
71 |
-
$taggedServices = $container->tagged($tag);
|
72 |
-
return \is_array($taggedServices) ? $taggedServices : \iterator_to_array($taggedServices);
|
73 |
-
});
|
74 |
-
}
|
75 |
-
/**
|
76 |
-
* Specify the configuration item to bind as a primitive.
|
77 |
-
*
|
78 |
-
* @param string $key
|
79 |
-
* @param ?string $default
|
80 |
-
* @return void
|
81 |
-
*/
|
82 |
-
public function giveConfig($key, $default = null)
|
83 |
-
{
|
84 |
-
$this->give(function ($container) use($key, $default) {
|
85 |
-
return $container->get('config')->get($key, $default);
|
86 |
-
});
|
87 |
-
}
|
88 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/container/EntryNotFoundException.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Container;
|
4 |
-
|
5 |
-
use Exception;
|
6 |
-
use Data443\gdpr\framework\Psr\Container\NotFoundExceptionInterface;
|
7 |
-
class EntryNotFoundException extends Exception implements NotFoundExceptionInterface
|
8 |
-
{
|
9 |
-
//
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/container/RewindableGenerator.php
DELETED
@@ -1,56 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Container;
|
4 |
-
|
5 |
-
use Countable;
|
6 |
-
use IteratorAggregate;
|
7 |
-
class RewindableGenerator implements Countable, IteratorAggregate
|
8 |
-
{
|
9 |
-
/**
|
10 |
-
* The generator callback.
|
11 |
-
*
|
12 |
-
* @var callable
|
13 |
-
*/
|
14 |
-
protected $generator;
|
15 |
-
/**
|
16 |
-
* The number of tagged services.
|
17 |
-
*
|
18 |
-
* @var callable|int
|
19 |
-
*/
|
20 |
-
protected $count;
|
21 |
-
/**
|
22 |
-
* Create a new generator instance.
|
23 |
-
*
|
24 |
-
* @param callable $generator
|
25 |
-
* @param callable|int $count
|
26 |
-
* @return void
|
27 |
-
*/
|
28 |
-
public function __construct(callable $generator, $count)
|
29 |
-
{
|
30 |
-
$this->count = $count;
|
31 |
-
$this->generator = $generator;
|
32 |
-
}
|
33 |
-
/**
|
34 |
-
* Get an iterator from the generator.
|
35 |
-
*
|
36 |
-
* @return mixed
|
37 |
-
*/
|
38 |
-
#[\ReturnTypeWillChange]
|
39 |
-
public function getIterator()
|
40 |
-
{
|
41 |
-
return ($this->generator)();
|
42 |
-
}
|
43 |
-
/**
|
44 |
-
* Get the total number of tagged services.
|
45 |
-
*
|
46 |
-
* @return int
|
47 |
-
*/
|
48 |
-
#[\ReturnTypeWillChange]
|
49 |
-
public function count()
|
50 |
-
{
|
51 |
-
if (\is_callable($count = $this->count)) {
|
52 |
-
$this->count = $count();
|
53 |
-
}
|
54 |
-
return $this->count;
|
55 |
-
}
|
56 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/container/Util.php
DELETED
@@ -1,64 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Container;
|
4 |
-
|
5 |
-
use Closure;
|
6 |
-
use ReflectionNamedType;
|
7 |
-
/**
|
8 |
-
* @internal
|
9 |
-
*/
|
10 |
-
class Util
|
11 |
-
{
|
12 |
-
/**
|
13 |
-
* If the given value is not an array and not null, wrap it in one.
|
14 |
-
*
|
15 |
-
* From Arr::wrap() in Illuminate\Support.
|
16 |
-
*
|
17 |
-
* @param mixed $value
|
18 |
-
* @return array
|
19 |
-
*/
|
20 |
-
public static function arrayWrap($value)
|
21 |
-
{
|
22 |
-
if (\is_null($value)) {
|
23 |
-
return [];
|
24 |
-
}
|
25 |
-
return \is_array($value) ? $value : [$value];
|
26 |
-
}
|
27 |
-
/**
|
28 |
-
* Return the default value of the given value.
|
29 |
-
*
|
30 |
-
* From global value() helper in Illuminate\Support.
|
31 |
-
*
|
32 |
-
* @param mixed $value
|
33 |
-
* @return mixed
|
34 |
-
*/
|
35 |
-
public static function unwrapIfClosure($value)
|
36 |
-
{
|
37 |
-
return $value instanceof Closure ? $value() : $value;
|
38 |
-
}
|
39 |
-
/**
|
40 |
-
* Get the class name of the given parameter's type, if possible.
|
41 |
-
*
|
42 |
-
* From Reflector::getParameterClassName() in Illuminate\Support.
|
43 |
-
*
|
44 |
-
* @param \ReflectionParameter $parameter
|
45 |
-
* @return string|null
|
46 |
-
*/
|
47 |
-
public static function getParameterClassName($parameter)
|
48 |
-
{
|
49 |
-
$type = $parameter->getType();
|
50 |
-
if (!$type instanceof ReflectionNamedType || $type->isBuiltin()) {
|
51 |
-
return null;
|
52 |
-
}
|
53 |
-
$name = $type->getName();
|
54 |
-
if (!\is_null($class = $parameter->getDeclaringClass())) {
|
55 |
-
if ($name === 'self') {
|
56 |
-
return $class->getName();
|
57 |
-
}
|
58 |
-
if ($name === 'parent' && ($parent = $class->getParentClass())) {
|
59 |
-
return $parent->getName();
|
60 |
-
}
|
61 |
-
}
|
62 |
-
return $name;
|
63 |
-
}
|
64 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Auth/Access/Authorizable.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Auth\Access;
|
4 |
-
|
5 |
-
interface Authorizable
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Determine if the entity has a given ability.
|
9 |
-
*
|
10 |
-
* @param iterable|string $abilities
|
11 |
-
* @param array|mixed $arguments
|
12 |
-
* @return bool
|
13 |
-
*/
|
14 |
-
public function can($abilities, $arguments = []);
|
15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Auth/Access/Gate.php
DELETED
@@ -1,135 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Auth\Access;
|
4 |
-
|
5 |
-
interface Gate
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Determine if a given ability has been defined.
|
9 |
-
*
|
10 |
-
* @param string $ability
|
11 |
-
* @return bool
|
12 |
-
*/
|
13 |
-
public function has($ability);
|
14 |
-
/**
|
15 |
-
* Define a new ability.
|
16 |
-
*
|
17 |
-
* @param string $ability
|
18 |
-
* @param callable|string $callback
|
19 |
-
* @return $this
|
20 |
-
*/
|
21 |
-
public function define($ability, $callback);
|
22 |
-
/**
|
23 |
-
* Define abilities for a resource.
|
24 |
-
*
|
25 |
-
* @param string $name
|
26 |
-
* @param string $class
|
27 |
-
* @param array|null $abilities
|
28 |
-
* @return $this
|
29 |
-
*/
|
30 |
-
public function resource($name, $class, array $abilities = null);
|
31 |
-
/**
|
32 |
-
* Define a policy class for a given class type.
|
33 |
-
*
|
34 |
-
* @param string $class
|
35 |
-
* @param string $policy
|
36 |
-
* @return $this
|
37 |
-
*/
|
38 |
-
public function policy($class, $policy);
|
39 |
-
/**
|
40 |
-
* Register a callback to run before all Gate checks.
|
41 |
-
*
|
42 |
-
* @param callable $callback
|
43 |
-
* @return $this
|
44 |
-
*/
|
45 |
-
public function before(callable $callback);
|
46 |
-
/**
|
47 |
-
* Register a callback to run after all Gate checks.
|
48 |
-
*
|
49 |
-
* @param callable $callback
|
50 |
-
* @return $this
|
51 |
-
*/
|
52 |
-
public function after(callable $callback);
|
53 |
-
/**
|
54 |
-
* Determine if the given ability should be granted for the current user.
|
55 |
-
*
|
56 |
-
* @param string $ability
|
57 |
-
* @param array|mixed $arguments
|
58 |
-
* @return bool
|
59 |
-
*/
|
60 |
-
public function allows($ability, $arguments = []);
|
61 |
-
/**
|
62 |
-
* Determine if the given ability should be denied for the current user.
|
63 |
-
*
|
64 |
-
* @param string $ability
|
65 |
-
* @param array|mixed $arguments
|
66 |
-
* @return bool
|
67 |
-
*/
|
68 |
-
public function denies($ability, $arguments = []);
|
69 |
-
/**
|
70 |
-
* Determine if all of the given abilities should be granted for the current user.
|
71 |
-
*
|
72 |
-
* @param iterable|string $abilities
|
73 |
-
* @param array|mixed $arguments
|
74 |
-
* @return bool
|
75 |
-
*/
|
76 |
-
public function check($abilities, $arguments = []);
|
77 |
-
/**
|
78 |
-
* Determine if any one of the given abilities should be granted for the current user.
|
79 |
-
*
|
80 |
-
* @param iterable|string $abilities
|
81 |
-
* @param array|mixed $arguments
|
82 |
-
* @return bool
|
83 |
-
*/
|
84 |
-
public function any($abilities, $arguments = []);
|
85 |
-
/**
|
86 |
-
* Determine if the given ability should be granted for the current user.
|
87 |
-
*
|
88 |
-
* @param string $ability
|
89 |
-
* @param array|mixed $arguments
|
90 |
-
* @return \Illuminate\Auth\Access\Response
|
91 |
-
*
|
92 |
-
* @throws \Illuminate\Auth\Access\AuthorizationException
|
93 |
-
*/
|
94 |
-
public function authorize($ability, $arguments = []);
|
95 |
-
/**
|
96 |
-
* Inspect the user for the given ability.
|
97 |
-
*
|
98 |
-
* @param string $ability
|
99 |
-
* @param array|mixed $arguments
|
100 |
-
* @return \Illuminate\Auth\Access\Response
|
101 |
-
*/
|
102 |
-
public function inspect($ability, $arguments = []);
|
103 |
-
/**
|
104 |
-
* Get the raw result from the authorization callback.
|
105 |
-
*
|
106 |
-
* @param string $ability
|
107 |
-
* @param array|mixed $arguments
|
108 |
-
* @return mixed
|
109 |
-
*
|
110 |
-
* @throws \Illuminate\Auth\Access\AuthorizationException
|
111 |
-
*/
|
112 |
-
public function raw($ability, $arguments = []);
|
113 |
-
/**
|
114 |
-
* Get a policy instance for a given class.
|
115 |
-
*
|
116 |
-
* @param object|string $class
|
117 |
-
* @return mixed
|
118 |
-
*
|
119 |
-
* @throws \InvalidArgumentException
|
120 |
-
*/
|
121 |
-
public function getPolicyFor($class);
|
122 |
-
/**
|
123 |
-
* Get a guard instance for the given user.
|
124 |
-
*
|
125 |
-
* @param \Illuminate\Contracts\Auth\Authenticatable|mixed $user
|
126 |
-
* @return static
|
127 |
-
*/
|
128 |
-
public function forUser($user);
|
129 |
-
/**
|
130 |
-
* Get all of the defined abilities.
|
131 |
-
*
|
132 |
-
* @return array
|
133 |
-
*/
|
134 |
-
public function abilities();
|
135 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Auth/Authenticatable.php
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Auth;
|
4 |
-
|
5 |
-
interface Authenticatable
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the name of the unique identifier for the user.
|
9 |
-
*
|
10 |
-
* @return string
|
11 |
-
*/
|
12 |
-
public function getAuthIdentifierName();
|
13 |
-
/**
|
14 |
-
* Get the unique identifier for the user.
|
15 |
-
*
|
16 |
-
* @return mixed
|
17 |
-
*/
|
18 |
-
public function getAuthIdentifier();
|
19 |
-
/**
|
20 |
-
* Get the password for the user.
|
21 |
-
*
|
22 |
-
* @return string
|
23 |
-
*/
|
24 |
-
public function getAuthPassword();
|
25 |
-
/**
|
26 |
-
* Get the token value for the "remember me" session.
|
27 |
-
*
|
28 |
-
* @return string
|
29 |
-
*/
|
30 |
-
public function getRememberToken();
|
31 |
-
/**
|
32 |
-
* Set the token value for the "remember me" session.
|
33 |
-
*
|
34 |
-
* @param string $value
|
35 |
-
* @return void
|
36 |
-
*/
|
37 |
-
public function setRememberToken($value);
|
38 |
-
/**
|
39 |
-
* Get the column name for the "remember me" token.
|
40 |
-
*
|
41 |
-
* @return string
|
42 |
-
*/
|
43 |
-
public function getRememberTokenName();
|
44 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Auth/CanResetPassword.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Auth;
|
4 |
-
|
5 |
-
interface CanResetPassword
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the e-mail address where password reset links are sent.
|
9 |
-
*
|
10 |
-
* @return string
|
11 |
-
*/
|
12 |
-
public function getEmailForPasswordReset();
|
13 |
-
/**
|
14 |
-
* Send the password reset notification.
|
15 |
-
*
|
16 |
-
* @param string $token
|
17 |
-
* @return void
|
18 |
-
*/
|
19 |
-
public function sendPasswordResetNotification($token);
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Auth/Factory.php
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Auth;
|
4 |
-
|
5 |
-
interface Factory
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get a guard instance by name.
|
9 |
-
*
|
10 |
-
* @param string|null $name
|
11 |
-
* @return \Illuminate\Contracts\Auth\Guard|\Illuminate\Contracts\Auth\StatefulGuard
|
12 |
-
*/
|
13 |
-
public function guard($name = null);
|
14 |
-
/**
|
15 |
-
* Set the default guard the factory should serve.
|
16 |
-
*
|
17 |
-
* @param string $name
|
18 |
-
* @return void
|
19 |
-
*/
|
20 |
-
public function shouldUse($name);
|
21 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Auth/Guard.php
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Auth;
|
4 |
-
|
5 |
-
interface Guard
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Determine if the current user is authenticated.
|
9 |
-
*
|
10 |
-
* @return bool
|
11 |
-
*/
|
12 |
-
public function check();
|
13 |
-
/**
|
14 |
-
* Determine if the current user is a guest.
|
15 |
-
*
|
16 |
-
* @return bool
|
17 |
-
*/
|
18 |
-
public function guest();
|
19 |
-
/**
|
20 |
-
* Get the currently authenticated user.
|
21 |
-
*
|
22 |
-
* @return \Illuminate\Contracts\Auth\Authenticatable|null
|
23 |
-
*/
|
24 |
-
public function user();
|
25 |
-
/**
|
26 |
-
* Get the ID for the currently authenticated user.
|
27 |
-
*
|
28 |
-
* @return int|string|null
|
29 |
-
*/
|
30 |
-
public function id();
|
31 |
-
/**
|
32 |
-
* Validate a user's credentials.
|
33 |
-
*
|
34 |
-
* @param array $credentials
|
35 |
-
* @return bool
|
36 |
-
*/
|
37 |
-
public function validate(array $credentials = []);
|
38 |
-
/**
|
39 |
-
* Set the current user.
|
40 |
-
*
|
41 |
-
* @param \Illuminate\Contracts\Auth\Authenticatable $user
|
42 |
-
* @return void
|
43 |
-
*/
|
44 |
-
public function setUser(Authenticatable $user);
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Auth/Middleware/AuthenticatesRequests.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Auth\Middleware;
|
4 |
-
|
5 |
-
interface AuthenticatesRequests
|
6 |
-
{
|
7 |
-
//
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Auth/MustVerifyEmail.php
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Auth;
|
4 |
-
|
5 |
-
interface MustVerifyEmail
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Determine if the user has verified their email address.
|
9 |
-
*
|
10 |
-
* @return bool
|
11 |
-
*/
|
12 |
-
public function hasVerifiedEmail();
|
13 |
-
/**
|
14 |
-
* Mark the given user's email as verified.
|
15 |
-
*
|
16 |
-
* @return bool
|
17 |
-
*/
|
18 |
-
public function markEmailAsVerified();
|
19 |
-
/**
|
20 |
-
* Send the email verification notification.
|
21 |
-
*
|
22 |
-
* @return void
|
23 |
-
*/
|
24 |
-
public function sendEmailVerificationNotification();
|
25 |
-
/**
|
26 |
-
* Get the email address that should be used for verification.
|
27 |
-
*
|
28 |
-
* @return string
|
29 |
-
*/
|
30 |
-
public function getEmailForVerification();
|
31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Auth/PasswordBroker.php
DELETED
@@ -1,54 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Auth;
|
4 |
-
|
5 |
-
use Closure;
|
6 |
-
interface PasswordBroker
|
7 |
-
{
|
8 |
-
/**
|
9 |
-
* Constant representing a successfully sent reminder.
|
10 |
-
*
|
11 |
-
* @var string
|
12 |
-
*/
|
13 |
-
const RESET_LINK_SENT = 'passwords.sent';
|
14 |
-
/**
|
15 |
-
* Constant representing a successfully reset password.
|
16 |
-
*
|
17 |
-
* @var string
|
18 |
-
*/
|
19 |
-
const PASSWORD_RESET = 'passwords.reset';
|
20 |
-
/**
|
21 |
-
* Constant representing the user not found response.
|
22 |
-
*
|
23 |
-
* @var string
|
24 |
-
*/
|
25 |
-
const INVALID_USER = 'passwords.user';
|
26 |
-
/**
|
27 |
-
* Constant representing an invalid token.
|
28 |
-
*
|
29 |
-
* @var string
|
30 |
-
*/
|
31 |
-
const INVALID_TOKEN = 'passwords.token';
|
32 |
-
/**
|
33 |
-
* Constant representing a throttled reset attempt.
|
34 |
-
*
|
35 |
-
* @var string
|
36 |
-
*/
|
37 |
-
const RESET_THROTTLED = 'passwords.throttled';
|
38 |
-
/**
|
39 |
-
* Send a password reset link to a user.
|
40 |
-
*
|
41 |
-
* @param array $credentials
|
42 |
-
* @param \Closure|null $callback
|
43 |
-
* @return string
|
44 |
-
*/
|
45 |
-
public function sendResetLink(array $credentials, Closure $callback = null);
|
46 |
-
/**
|
47 |
-
* Reset the password for the given token.
|
48 |
-
*
|
49 |
-
* @param array $credentials
|
50 |
-
* @param \Closure $callback
|
51 |
-
* @return mixed
|
52 |
-
*/
|
53 |
-
public function reset(array $credentials, Closure $callback);
|
54 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Auth/PasswordBrokerFactory.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Auth;
|
4 |
-
|
5 |
-
interface PasswordBrokerFactory
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get a password broker instance by name.
|
9 |
-
*
|
10 |
-
* @param string|null $name
|
11 |
-
* @return mixed
|
12 |
-
*/
|
13 |
-
public function broker($name = null);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Auth/StatefulGuard.php
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Auth;
|
4 |
-
|
5 |
-
interface StatefulGuard extends Guard
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Attempt to authenticate a user using the given credentials.
|
9 |
-
*
|
10 |
-
* @param array $credentials
|
11 |
-
* @param bool $remember
|
12 |
-
* @return bool
|
13 |
-
*/
|
14 |
-
public function attempt(array $credentials = [], $remember = \false);
|
15 |
-
/**
|
16 |
-
* Log a user into the application without sessions or cookies.
|
17 |
-
*
|
18 |
-
* @param array $credentials
|
19 |
-
* @return bool
|
20 |
-
*/
|
21 |
-
public function once(array $credentials = []);
|
22 |
-
/**
|
23 |
-
* Log a user into the application.
|
24 |
-
*
|
25 |
-
* @param \Illuminate\Contracts\Auth\Authenticatable $user
|
26 |
-
* @param bool $remember
|
27 |
-
* @return void
|
28 |
-
*/
|
29 |
-
public function login(Authenticatable $user, $remember = \false);
|
30 |
-
/**
|
31 |
-
* Log the given user ID into the application.
|
32 |
-
*
|
33 |
-
* @param mixed $id
|
34 |
-
* @param bool $remember
|
35 |
-
* @return \Illuminate\Contracts\Auth\Authenticatable|bool
|
36 |
-
*/
|
37 |
-
public function loginUsingId($id, $remember = \false);
|
38 |
-
/**
|
39 |
-
* Log the given user ID into the application without sessions or cookies.
|
40 |
-
*
|
41 |
-
* @param mixed $id
|
42 |
-
* @return \Illuminate\Contracts\Auth\Authenticatable|bool
|
43 |
-
*/
|
44 |
-
public function onceUsingId($id);
|
45 |
-
/**
|
46 |
-
* Determine if the user was authenticated via "remember me" cookie.
|
47 |
-
*
|
48 |
-
* @return bool
|
49 |
-
*/
|
50 |
-
public function viaRemember();
|
51 |
-
/**
|
52 |
-
* Log the user out of the application.
|
53 |
-
*
|
54 |
-
* @return void
|
55 |
-
*/
|
56 |
-
public function logout();
|
57 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Auth/SupportsBasicAuth.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Auth;
|
4 |
-
|
5 |
-
interface SupportsBasicAuth
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Attempt to authenticate using HTTP Basic Auth.
|
9 |
-
*
|
10 |
-
* @param string $field
|
11 |
-
* @param array $extraConditions
|
12 |
-
* @return \Symfony\Component\HttpFoundation\Response|null
|
13 |
-
*/
|
14 |
-
public function basic($field = 'email', $extraConditions = []);
|
15 |
-
/**
|
16 |
-
* Perform a stateless HTTP Basic login attempt.
|
17 |
-
*
|
18 |
-
* @param string $field
|
19 |
-
* @param array $extraConditions
|
20 |
-
* @return \Symfony\Component\HttpFoundation\Response|null
|
21 |
-
*/
|
22 |
-
public function onceBasic($field = 'email', $extraConditions = []);
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Auth/UserProvider.php
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Auth;
|
4 |
-
|
5 |
-
interface UserProvider
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Retrieve a user by their unique identifier.
|
9 |
-
*
|
10 |
-
* @param mixed $identifier
|
11 |
-
* @return \Illuminate\Contracts\Auth\Authenticatable|null
|
12 |
-
*/
|
13 |
-
public function retrieveById($identifier);
|
14 |
-
/**
|
15 |
-
* Retrieve a user by their unique identifier and "remember me" token.
|
16 |
-
*
|
17 |
-
* @param mixed $identifier
|
18 |
-
* @param string $token
|
19 |
-
* @return \Illuminate\Contracts\Auth\Authenticatable|null
|
20 |
-
*/
|
21 |
-
public function retrieveByToken($identifier, $token);
|
22 |
-
/**
|
23 |
-
* Update the "remember me" token for the given user in storage.
|
24 |
-
*
|
25 |
-
* @param \Illuminate\Contracts\Auth\Authenticatable $user
|
26 |
-
* @param string $token
|
27 |
-
* @return void
|
28 |
-
*/
|
29 |
-
public function updateRememberToken(Authenticatable $user, $token);
|
30 |
-
/**
|
31 |
-
* Retrieve a user by the given credentials.
|
32 |
-
*
|
33 |
-
* @param array $credentials
|
34 |
-
* @return \Illuminate\Contracts\Auth\Authenticatable|null
|
35 |
-
*/
|
36 |
-
public function retrieveByCredentials(array $credentials);
|
37 |
-
/**
|
38 |
-
* Validate a user against the given credentials.
|
39 |
-
*
|
40 |
-
* @param \Illuminate\Contracts\Auth\Authenticatable $user
|
41 |
-
* @param array $credentials
|
42 |
-
* @return bool
|
43 |
-
*/
|
44 |
-
public function validateCredentials(Authenticatable $user, array $credentials);
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Broadcasting/Broadcaster.php
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Broadcasting;
|
4 |
-
|
5 |
-
interface Broadcaster
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Authenticate the incoming request for a given channel.
|
9 |
-
*
|
10 |
-
* @param \Illuminate\Http\Request $request
|
11 |
-
* @return mixed
|
12 |
-
*/
|
13 |
-
public function auth($request);
|
14 |
-
/**
|
15 |
-
* Return the valid authentication response.
|
16 |
-
*
|
17 |
-
* @param \Illuminate\Http\Request $request
|
18 |
-
* @param mixed $result
|
19 |
-
* @return mixed
|
20 |
-
*/
|
21 |
-
public function validAuthenticationResponse($request, $result);
|
22 |
-
/**
|
23 |
-
* Broadcast the given event.
|
24 |
-
*
|
25 |
-
* @param array $channels
|
26 |
-
* @param string $event
|
27 |
-
* @param array $payload
|
28 |
-
* @return void
|
29 |
-
*/
|
30 |
-
public function broadcast(array $channels, $event, array $payload = []);
|
31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Broadcasting/Factory.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Broadcasting;
|
4 |
-
|
5 |
-
interface Factory
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get a broadcaster implementation by name.
|
9 |
-
*
|
10 |
-
* @param string|null $name
|
11 |
-
* @return \Illuminate\Contracts\Broadcasting\Broadcaster
|
12 |
-
*/
|
13 |
-
public function connection($name = null);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Broadcasting/HasBroadcastChannel.php
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Broadcasting;
|
4 |
-
|
5 |
-
interface HasBroadcastChannel
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the broadcast channel route definition that is associated with the given entity.
|
9 |
-
*
|
10 |
-
* @return string
|
11 |
-
*/
|
12 |
-
public function broadcastChannelRoute();
|
13 |
-
/**
|
14 |
-
* Get the broadcast channel name that is associated with the given entity.
|
15 |
-
*
|
16 |
-
* @return string
|
17 |
-
*/
|
18 |
-
public function broadcastChannel();
|
19 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Broadcasting/ShouldBroadcast.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Broadcasting;
|
4 |
-
|
5 |
-
interface ShouldBroadcast
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the channels the event should broadcast on.
|
9 |
-
*
|
10 |
-
* @return \Illuminate\Broadcasting\Channel|\Illuminate\Broadcasting\Channel[]|string[]|string
|
11 |
-
*/
|
12 |
-
public function broadcastOn();
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Broadcasting/ShouldBroadcastNow.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Broadcasting;
|
4 |
-
|
5 |
-
interface ShouldBroadcastNow extends ShouldBroadcast
|
6 |
-
{
|
7 |
-
//
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Bus/Dispatcher.php
DELETED
@@ -1,60 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Bus;
|
4 |
-
|
5 |
-
interface Dispatcher
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Dispatch a command to its appropriate handler.
|
9 |
-
*
|
10 |
-
* @param mixed $command
|
11 |
-
* @return mixed
|
12 |
-
*/
|
13 |
-
public function dispatch($command);
|
14 |
-
/**
|
15 |
-
* Dispatch a command to its appropriate handler in the current process.
|
16 |
-
*
|
17 |
-
* Queueable jobs will be dispatched to the "sync" queue.
|
18 |
-
*
|
19 |
-
* @param mixed $command
|
20 |
-
* @param mixed $handler
|
21 |
-
* @return mixed
|
22 |
-
*/
|
23 |
-
public function dispatchSync($command, $handler = null);
|
24 |
-
/**
|
25 |
-
* Dispatch a command to its appropriate handler in the current process.
|
26 |
-
*
|
27 |
-
* @param mixed $command
|
28 |
-
* @param mixed $handler
|
29 |
-
* @return mixed
|
30 |
-
*/
|
31 |
-
public function dispatchNow($command, $handler = null);
|
32 |
-
/**
|
33 |
-
* Determine if the given command has a handler.
|
34 |
-
*
|
35 |
-
* @param mixed $command
|
36 |
-
* @return bool
|
37 |
-
*/
|
38 |
-
public function hasCommandHandler($command);
|
39 |
-
/**
|
40 |
-
* Retrieve the handler for a command.
|
41 |
-
*
|
42 |
-
* @param mixed $command
|
43 |
-
* @return bool|mixed
|
44 |
-
*/
|
45 |
-
public function getCommandHandler($command);
|
46 |
-
/**
|
47 |
-
* Set the pipes commands should be piped through before dispatching.
|
48 |
-
*
|
49 |
-
* @param array $pipes
|
50 |
-
* @return $this
|
51 |
-
*/
|
52 |
-
public function pipeThrough(array $pipes);
|
53 |
-
/**
|
54 |
-
* Map a command to a handler.
|
55 |
-
*
|
56 |
-
* @param array $map
|
57 |
-
* @return $this
|
58 |
-
*/
|
59 |
-
public function map(array $map);
|
60 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Bus/QueueingDispatcher.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Bus;
|
4 |
-
|
5 |
-
interface QueueingDispatcher extends Dispatcher
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Attempt to find the batch with the given ID.
|
9 |
-
*
|
10 |
-
* @param string $batchId
|
11 |
-
* @return \Illuminate\Bus\Batch|null
|
12 |
-
*/
|
13 |
-
public function findBatch(string $batchId);
|
14 |
-
/**
|
15 |
-
* Create a new batch of queueable jobs.
|
16 |
-
*
|
17 |
-
* @param \Illuminate\Support\Collection|array $jobs
|
18 |
-
* @return \Illuminate\Bus\PendingBatch
|
19 |
-
*/
|
20 |
-
public function batch($jobs);
|
21 |
-
/**
|
22 |
-
* Dispatch a command to its appropriate handler behind a queue.
|
23 |
-
*
|
24 |
-
* @param mixed $command
|
25 |
-
* @return mixed
|
26 |
-
*/
|
27 |
-
public function dispatchToQueue($command);
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Cache/Factory.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Cache;
|
4 |
-
|
5 |
-
interface Factory
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get a cache store instance by name.
|
9 |
-
*
|
10 |
-
* @param string|null $name
|
11 |
-
* @return \Illuminate\Contracts\Cache\Repository
|
12 |
-
*/
|
13 |
-
public function store($name = null);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Cache/Lock.php
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Cache;
|
4 |
-
|
5 |
-
interface Lock
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Attempt to acquire the lock.
|
9 |
-
*
|
10 |
-
* @param callable|null $callback
|
11 |
-
* @return mixed
|
12 |
-
*/
|
13 |
-
public function get($callback = null);
|
14 |
-
/**
|
15 |
-
* Attempt to acquire the lock for the given number of seconds.
|
16 |
-
*
|
17 |
-
* @param int $seconds
|
18 |
-
* @param callable|null $callback
|
19 |
-
* @return mixed
|
20 |
-
*/
|
21 |
-
public function block($seconds, $callback = null);
|
22 |
-
/**
|
23 |
-
* Release the lock.
|
24 |
-
*
|
25 |
-
* @return bool
|
26 |
-
*/
|
27 |
-
public function release();
|
28 |
-
/**
|
29 |
-
* Returns the current owner of the lock.
|
30 |
-
*
|
31 |
-
* @return string
|
32 |
-
*/
|
33 |
-
public function owner();
|
34 |
-
/**
|
35 |
-
* Releases this lock in disregard of ownership.
|
36 |
-
*
|
37 |
-
* @return void
|
38 |
-
*/
|
39 |
-
public function forceRelease();
|
40 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Cache/LockProvider.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Cache;
|
4 |
-
|
5 |
-
interface LockProvider
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get a lock instance.
|
9 |
-
*
|
10 |
-
* @param string $name
|
11 |
-
* @param int $seconds
|
12 |
-
* @param string|null $owner
|
13 |
-
* @return \Illuminate\Contracts\Cache\Lock
|
14 |
-
*/
|
15 |
-
public function lock($name, $seconds = 0, $owner = null);
|
16 |
-
/**
|
17 |
-
* Restore a lock instance using the owner identifier.
|
18 |
-
*
|
19 |
-
* @param string $name
|
20 |
-
* @param string $owner
|
21 |
-
* @return \Illuminate\Contracts\Cache\Lock
|
22 |
-
*/
|
23 |
-
public function restoreLock($name, $owner);
|
24 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Cache/LockTimeoutException.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Cache;
|
4 |
-
|
5 |
-
use Exception;
|
6 |
-
class LockTimeoutException extends Exception
|
7 |
-
{
|
8 |
-
//
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Cache/Repository.php
DELETED
@@ -1,97 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Cache;
|
4 |
-
|
5 |
-
use Closure;
|
6 |
-
use Data443\gdpr\framework\Psr\SimpleCache\CacheInterface;
|
7 |
-
interface Repository extends CacheInterface
|
8 |
-
{
|
9 |
-
/**
|
10 |
-
* Retrieve an item from the cache and delete it.
|
11 |
-
*
|
12 |
-
* @param string $key
|
13 |
-
* @param mixed $default
|
14 |
-
* @return mixed
|
15 |
-
*/
|
16 |
-
public function pull($key, $default = null);
|
17 |
-
/**
|
18 |
-
* Store an item in the cache.
|
19 |
-
*
|
20 |
-
* @param string $key
|
21 |
-
* @param mixed $value
|
22 |
-
* @param \DateTimeInterface|\DateInterval|int|null $ttl
|
23 |
-
* @return bool
|
24 |
-
*/
|
25 |
-
public function put($key, $value, $ttl = null);
|
26 |
-
/**
|
27 |
-
* Store an item in the cache if the key does not exist.
|
28 |
-
*
|
29 |
-
* @param string $key
|
30 |
-
* @param mixed $value
|
31 |
-
* @param \DateTimeInterface|\DateInterval|int|null $ttl
|
32 |
-
* @return bool
|
33 |
-
*/
|
34 |
-
public function add($key, $value, $ttl = null);
|
35 |
-
/**
|
36 |
-
* Increment the value of an item in the cache.
|
37 |
-
*
|
38 |
-
* @param string $key
|
39 |
-
* @param mixed $value
|
40 |
-
* @return int|bool
|
41 |
-
*/
|
42 |
-
public function increment($key, $value = 1);
|
43 |
-
/**
|
44 |
-
* Decrement the value of an item in the cache.
|
45 |
-
*
|
46 |
-
* @param string $key
|
47 |
-
* @param mixed $value
|
48 |
-
* @return int|bool
|
49 |
-
*/
|
50 |
-
public function decrement($key, $value = 1);
|
51 |
-
/**
|
52 |
-
* Store an item in the cache indefinitely.
|
53 |
-
*
|
54 |
-
* @param string $key
|
55 |
-
* @param mixed $value
|
56 |
-
* @return bool
|
57 |
-
*/
|
58 |
-
public function forever($key, $value);
|
59 |
-
/**
|
60 |
-
* Get an item from the cache, or execute the given Closure and store the result.
|
61 |
-
*
|
62 |
-
* @param string $key
|
63 |
-
* @param \DateTimeInterface|\DateInterval|int|null $ttl
|
64 |
-
* @param \Closure $callback
|
65 |
-
* @return mixed
|
66 |
-
*/
|
67 |
-
public function remember($key, $ttl, Closure $callback);
|
68 |
-
/**
|
69 |
-
* Get an item from the cache, or execute the given Closure and store the result forever.
|
70 |
-
*
|
71 |
-
* @param string $key
|
72 |
-
* @param \Closure $callback
|
73 |
-
* @return mixed
|
74 |
-
*/
|
75 |
-
public function sear($key, Closure $callback);
|
76 |
-
/**
|
77 |
-
* Get an item from the cache, or execute the given Closure and store the result forever.
|
78 |
-
*
|
79 |
-
* @param string $key
|
80 |
-
* @param \Closure $callback
|
81 |
-
* @return mixed
|
82 |
-
*/
|
83 |
-
public function rememberForever($key, Closure $callback);
|
84 |
-
/**
|
85 |
-
* Remove an item from the cache.
|
86 |
-
*
|
87 |
-
* @param string $key
|
88 |
-
* @return bool
|
89 |
-
*/
|
90 |
-
public function forget($key);
|
91 |
-
/**
|
92 |
-
* Get the cache store implementation.
|
93 |
-
*
|
94 |
-
* @return \Illuminate\Contracts\Cache\Store
|
95 |
-
*/
|
96 |
-
public function getStore();
|
97 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Cache/Store.php
DELETED
@@ -1,83 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Cache;
|
4 |
-
|
5 |
-
interface Store
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Retrieve an item from the cache by key.
|
9 |
-
*
|
10 |
-
* @param string|array $key
|
11 |
-
* @return mixed
|
12 |
-
*/
|
13 |
-
public function get($key);
|
14 |
-
/**
|
15 |
-
* Retrieve multiple items from the cache by key.
|
16 |
-
*
|
17 |
-
* Items not found in the cache will have a null value.
|
18 |
-
*
|
19 |
-
* @param array $keys
|
20 |
-
* @return array
|
21 |
-
*/
|
22 |
-
public function many(array $keys);
|
23 |
-
/**
|
24 |
-
* Store an item in the cache for a given number of seconds.
|
25 |
-
*
|
26 |
-
* @param string $key
|
27 |
-
* @param mixed $value
|
28 |
-
* @param int $seconds
|
29 |
-
* @return bool
|
30 |
-
*/
|
31 |
-
public function put($key, $value, $seconds);
|
32 |
-
/**
|
33 |
-
* Store multiple items in the cache for a given number of seconds.
|
34 |
-
*
|
35 |
-
* @param array $values
|
36 |
-
* @param int $seconds
|
37 |
-
* @return bool
|
38 |
-
*/
|
39 |
-
public function putMany(array $values, $seconds);
|
40 |
-
/**
|
41 |
-
* Increment the value of an item in the cache.
|
42 |
-
*
|
43 |
-
* @param string $key
|
44 |
-
* @param mixed $value
|
45 |
-
* @return int|bool
|
46 |
-
*/
|
47 |
-
public function increment($key, $value = 1);
|
48 |
-
/**
|
49 |
-
* Decrement the value of an item in the cache.
|
50 |
-
*
|
51 |
-
* @param string $key
|
52 |
-
* @param mixed $value
|
53 |
-
* @return int|bool
|
54 |
-
*/
|
55 |
-
public function decrement($key, $value = 1);
|
56 |
-
/**
|
57 |
-
* Store an item in the cache indefinitely.
|
58 |
-
*
|
59 |
-
* @param string $key
|
60 |
-
* @param mixed $value
|
61 |
-
* @return bool
|
62 |
-
*/
|
63 |
-
public function forever($key, $value);
|
64 |
-
/**
|
65 |
-
* Remove an item from the cache.
|
66 |
-
*
|
67 |
-
* @param string $key
|
68 |
-
* @return bool
|
69 |
-
*/
|
70 |
-
public function forget($key);
|
71 |
-
/**
|
72 |
-
* Remove all items from the cache.
|
73 |
-
*
|
74 |
-
* @return bool
|
75 |
-
*/
|
76 |
-
public function flush();
|
77 |
-
/**
|
78 |
-
* Get the cache key prefix.
|
79 |
-
*
|
80 |
-
* @return string
|
81 |
-
*/
|
82 |
-
public function getPrefix();
|
83 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Config/Repository.php
DELETED
@@ -1,52 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Config;
|
4 |
-
|
5 |
-
interface Repository
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Determine if the given configuration value exists.
|
9 |
-
*
|
10 |
-
* @param string $key
|
11 |
-
* @return bool
|
12 |
-
*/
|
13 |
-
public function has($key);
|
14 |
-
/**
|
15 |
-
* Get the specified configuration value.
|
16 |
-
*
|
17 |
-
* @param array|string $key
|
18 |
-
* @param mixed $default
|
19 |
-
* @return mixed
|
20 |
-
*/
|
21 |
-
public function get($key, $default = null);
|
22 |
-
/**
|
23 |
-
* Get all of the configuration items for the application.
|
24 |
-
*
|
25 |
-
* @return array
|
26 |
-
*/
|
27 |
-
public function all();
|
28 |
-
/**
|
29 |
-
* Set a given configuration value.
|
30 |
-
*
|
31 |
-
* @param array|string $key
|
32 |
-
* @param mixed $value
|
33 |
-
* @return void
|
34 |
-
*/
|
35 |
-
public function set($key, $value = null);
|
36 |
-
/**
|
37 |
-
* Prepend a value onto an array configuration value.
|
38 |
-
*
|
39 |
-
* @param string $key
|
40 |
-
* @param mixed $value
|
41 |
-
* @return void
|
42 |
-
*/
|
43 |
-
public function prepend($key, $value);
|
44 |
-
/**
|
45 |
-
* Push a value onto an array configuration value.
|
46 |
-
*
|
47 |
-
* @param string $key
|
48 |
-
* @param mixed $value
|
49 |
-
* @return void
|
50 |
-
*/
|
51 |
-
public function push($key, $value);
|
52 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Console/Application.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Console;
|
4 |
-
|
5 |
-
interface Application
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Run an Artisan console command by name.
|
9 |
-
*
|
10 |
-
* @param string $command
|
11 |
-
* @param array $parameters
|
12 |
-
* @param \Symfony\Component\Console\Output\OutputInterface|null $outputBuffer
|
13 |
-
* @return int
|
14 |
-
*/
|
15 |
-
public function call($command, array $parameters = [], $outputBuffer = null);
|
16 |
-
/**
|
17 |
-
* Get the output from the last command.
|
18 |
-
*
|
19 |
-
* @return string
|
20 |
-
*/
|
21 |
-
public function output();
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Console/Kernel.php
DELETED
@@ -1,58 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Console;
|
4 |
-
|
5 |
-
interface Kernel
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Bootstrap the application for artisan commands.
|
9 |
-
*
|
10 |
-
* @return void
|
11 |
-
*/
|
12 |
-
public function bootstrap();
|
13 |
-
/**
|
14 |
-
* Handle an incoming console command.
|
15 |
-
*
|
16 |
-
* @param \Symfony\Component\Console\Input\InputInterface $input
|
17 |
-
* @param \Symfony\Component\Console\Output\OutputInterface|null $output
|
18 |
-
* @return int
|
19 |
-
*/
|
20 |
-
public function handle($input, $output = null);
|
21 |
-
/**
|
22 |
-
* Run an Artisan console command by name.
|
23 |
-
*
|
24 |
-
* @param string $command
|
25 |
-
* @param array $parameters
|
26 |
-
* @param \Symfony\Component\Console\Output\OutputInterface|null $outputBuffer
|
27 |
-
* @return int
|
28 |
-
*/
|
29 |
-
public function call($command, array $parameters = [], $outputBuffer = null);
|
30 |
-
/**
|
31 |
-
* Queue an Artisan console command by name.
|
32 |
-
*
|
33 |
-
* @param string $command
|
34 |
-
* @param array $parameters
|
35 |
-
* @return \Illuminate\Foundation\Bus\PendingDispatch
|
36 |
-
*/
|
37 |
-
public function queue($command, array $parameters = []);
|
38 |
-
/**
|
39 |
-
* Get all of the commands registered with the console.
|
40 |
-
*
|
41 |
-
* @return array
|
42 |
-
*/
|
43 |
-
public function all();
|
44 |
-
/**
|
45 |
-
* Get the output for the last run command.
|
46 |
-
*
|
47 |
-
* @return string
|
48 |
-
*/
|
49 |
-
public function output();
|
50 |
-
/**
|
51 |
-
* Terminate the application.
|
52 |
-
*
|
53 |
-
* @param \Symfony\Component\Console\Input\InputInterface $input
|
54 |
-
* @param int $status
|
55 |
-
* @return void
|
56 |
-
*/
|
57 |
-
public function terminate($input, $status);
|
58 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Container/BindingResolutionException.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Container;
|
4 |
-
|
5 |
-
use Exception;
|
6 |
-
use Data443\gdpr\framework\Psr\Container\ContainerExceptionInterface;
|
7 |
-
class BindingResolutionException extends Exception implements ContainerExceptionInterface
|
8 |
-
{
|
9 |
-
//
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Container/CircularDependencyException.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Container;
|
4 |
-
|
5 |
-
use Exception;
|
6 |
-
use Data443\gdpr\framework\Psr\Container\ContainerExceptionInterface;
|
7 |
-
class CircularDependencyException extends Exception implements ContainerExceptionInterface
|
8 |
-
{
|
9 |
-
//
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Container/Container.php
DELETED
@@ -1,164 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Container;
|
4 |
-
|
5 |
-
use Closure;
|
6 |
-
use Data443\gdpr\framework\Psr\Container\ContainerInterface;
|
7 |
-
interface Container extends ContainerInterface
|
8 |
-
{
|
9 |
-
/**
|
10 |
-
* Determine if the given abstract type has been bound.
|
11 |
-
*
|
12 |
-
* @param string $abstract
|
13 |
-
* @return bool
|
14 |
-
*/
|
15 |
-
public function bound($abstract);
|
16 |
-
/**
|
17 |
-
* Alias a type to a different name.
|
18 |
-
*
|
19 |
-
* @param string $abstract
|
20 |
-
* @param string $alias
|
21 |
-
* @return void
|
22 |
-
*
|
23 |
-
* @throws \LogicException
|
24 |
-
*/
|
25 |
-
public function alias($abstract, $alias);
|
26 |
-
/**
|
27 |
-
* Assign a set of tags to a given binding.
|
28 |
-
*
|
29 |
-
* @param array|string $abstracts
|
30 |
-
* @param array|mixed ...$tags
|
31 |
-
* @return void
|
32 |
-
*/
|
33 |
-
public function tag($abstracts, $tags);
|
34 |
-
/**
|
35 |
-
* Resolve all of the bindings for a given tag.
|
36 |
-
*
|
37 |
-
* @param string $tag
|
38 |
-
* @return iterable
|
39 |
-
*/
|
40 |
-
public function tagged($tag);
|
41 |
-
/**
|
42 |
-
* Register a binding with the container.
|
43 |
-
*
|
44 |
-
* @param string $abstract
|
45 |
-
* @param \Closure|string|null $concrete
|
46 |
-
* @param bool $shared
|
47 |
-
* @return void
|
48 |
-
*/
|
49 |
-
public function bind($abstract, $concrete = null, $shared = \false);
|
50 |
-
/**
|
51 |
-
* Register a binding if it hasn't already been registered.
|
52 |
-
*
|
53 |
-
* @param string $abstract
|
54 |
-
* @param \Closure|string|null $concrete
|
55 |
-
* @param bool $shared
|
56 |
-
* @return void
|
57 |
-
*/
|
58 |
-
public function bindIf($abstract, $concrete = null, $shared = \false);
|
59 |
-
/**
|
60 |
-
* Register a shared binding in the container.
|
61 |
-
*
|
62 |
-
* @param string $abstract
|
63 |
-
* @param \Closure|string|null $concrete
|
64 |
-
* @return void
|
65 |
-
*/
|
66 |
-
public function singleton($abstract, $concrete = null);
|
67 |
-
/**
|
68 |
-
* Register a shared binding if it hasn't already been registered.
|
69 |
-
*
|
70 |
-
* @param string $abstract
|
71 |
-
* @param \Closure|string|null $concrete
|
72 |
-
* @return void
|
73 |
-
*/
|
74 |
-
public function singletonIf($abstract, $concrete = null);
|
75 |
-
/**
|
76 |
-
* "Extend" an abstract type in the container.
|
77 |
-
*
|
78 |
-
* @param string $abstract
|
79 |
-
* @param \Closure $closure
|
80 |
-
* @return void
|
81 |
-
*
|
82 |
-
* @throws \InvalidArgumentException
|
83 |
-
*/
|
84 |
-
public function extend($abstract, Closure $closure);
|
85 |
-
/**
|
86 |
-
* Register an existing instance as shared in the container.
|
87 |
-
*
|
88 |
-
* @param string $abstract
|
89 |
-
* @param mixed $instance
|
90 |
-
* @return mixed
|
91 |
-
*/
|
92 |
-
public function instance($abstract, $instance);
|
93 |
-
/**
|
94 |
-
* Add a contextual binding to the container.
|
95 |
-
*
|
96 |
-
* @param string $concrete
|
97 |
-
* @param string $abstract
|
98 |
-
* @param \Closure|string $implementation
|
99 |
-
* @return void
|
100 |
-
*/
|
101 |
-
public function addContextualBinding($concrete, $abstract, $implementation);
|
102 |
-
/**
|
103 |
-
* Define a contextual binding.
|
104 |
-
*
|
105 |
-
* @param string|array $concrete
|
106 |
-
* @return \Illuminate\Contracts\Container\ContextualBindingBuilder
|
107 |
-
*/
|
108 |
-
public function when($concrete);
|
109 |
-
/**
|
110 |
-
* Get a closure to resolve the given type from the container.
|
111 |
-
*
|
112 |
-
* @param string $abstract
|
113 |
-
* @return \Closure
|
114 |
-
*/
|
115 |
-
public function factory($abstract);
|
116 |
-
/**
|
117 |
-
* Flush the container of all bindings and resolved instances.
|
118 |
-
*
|
119 |
-
* @return void
|
120 |
-
*/
|
121 |
-
public function flush();
|
122 |
-
/**
|
123 |
-
* Resolve the given type from the container.
|
124 |
-
*
|
125 |
-
* @param string $abstract
|
126 |
-
* @param array $parameters
|
127 |
-
* @return mixed
|
128 |
-
*
|
129 |
-
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
130 |
-
*/
|
131 |
-
public function make($abstract, array $parameters = []);
|
132 |
-
/**
|
133 |
-
* Call the given Closure / class@method and inject its dependencies.
|
134 |
-
*
|
135 |
-
* @param callable|string $callback
|
136 |
-
* @param array $parameters
|
137 |
-
* @param string|null $defaultMethod
|
138 |
-
* @return mixed
|
139 |
-
*/
|
140 |
-
public function call($callback, array $parameters = [], $defaultMethod = null);
|
141 |
-
/**
|
142 |
-
* Determine if the given abstract type has been resolved.
|
143 |
-
*
|
144 |
-
* @param string $abstract
|
145 |
-
* @return bool
|
146 |
-
*/
|
147 |
-
public function resolved($abstract);
|
148 |
-
/**
|
149 |
-
* Register a new resolving callback.
|
150 |
-
*
|
151 |
-
* @param \Closure|string $abstract
|
152 |
-
* @param \Closure|null $callback
|
153 |
-
* @return void
|
154 |
-
*/
|
155 |
-
public function resolving($abstract, Closure $callback = null);
|
156 |
-
/**
|
157 |
-
* Register a new after resolving callback.
|
158 |
-
*
|
159 |
-
* @param \Closure|string $abstract
|
160 |
-
* @param \Closure|null $callback
|
161 |
-
* @return void
|
162 |
-
*/
|
163 |
-
public function afterResolving($abstract, Closure $callback = null);
|
164 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Container/ContextualBindingBuilder.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Container;
|
4 |
-
|
5 |
-
interface ContextualBindingBuilder
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Define the abstract target that depends on the context.
|
9 |
-
*
|
10 |
-
* @param string $abstract
|
11 |
-
* @return $this
|
12 |
-
*/
|
13 |
-
public function needs($abstract);
|
14 |
-
/**
|
15 |
-
* Define the implementation for the contextual binding.
|
16 |
-
*
|
17 |
-
* @param \Closure|string|array $implementation
|
18 |
-
* @return void
|
19 |
-
*/
|
20 |
-
public function give($implementation);
|
21 |
-
/**
|
22 |
-
* Define tagged services to be used as the implementation for the contextual binding.
|
23 |
-
*
|
24 |
-
* @param string $tag
|
25 |
-
* @return void
|
26 |
-
*/
|
27 |
-
public function giveTagged($tag);
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Cookie/Factory.php
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Cookie;
|
4 |
-
|
5 |
-
interface Factory
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Create a new cookie instance.
|
9 |
-
*
|
10 |
-
* @param string $name
|
11 |
-
* @param string $value
|
12 |
-
* @param int $minutes
|
13 |
-
* @param string|null $path
|
14 |
-
* @param string|null $domain
|
15 |
-
* @param bool|null $secure
|
16 |
-
* @param bool $httpOnly
|
17 |
-
* @param bool $raw
|
18 |
-
* @param string|null $sameSite
|
19 |
-
* @return \Symfony\Component\HttpFoundation\Cookie
|
20 |
-
*/
|
21 |
-
public function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = null, $httpOnly = \true, $raw = \false, $sameSite = null);
|
22 |
-
/**
|
23 |
-
* Create a cookie that lasts "forever" (five years).
|
24 |
-
*
|
25 |
-
* @param string $name
|
26 |
-
* @param string $value
|
27 |
-
* @param string|null $path
|
28 |
-
* @param string|null $domain
|
29 |
-
* @param bool|null $secure
|
30 |
-
* @param bool $httpOnly
|
31 |
-
* @param bool $raw
|
32 |
-
* @param string|null $sameSite
|
33 |
-
* @return \Symfony\Component\HttpFoundation\Cookie
|
34 |
-
*/
|
35 |
-
public function forever($name, $value, $path = null, $domain = null, $secure = null, $httpOnly = \true, $raw = \false, $sameSite = null);
|
36 |
-
/**
|
37 |
-
* Expire the given cookie.
|
38 |
-
*
|
39 |
-
* @param string $name
|
40 |
-
* @param string|null $path
|
41 |
-
* @param string|null $domain
|
42 |
-
* @return \Symfony\Component\HttpFoundation\Cookie
|
43 |
-
*/
|
44 |
-
public function forget($name, $path = null, $domain = null);
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Cookie/QueueingFactory.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Cookie;
|
4 |
-
|
5 |
-
interface QueueingFactory extends Factory
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Queue a cookie to send with the next response.
|
9 |
-
*
|
10 |
-
* @param array $parameters
|
11 |
-
* @return void
|
12 |
-
*/
|
13 |
-
public function queue(...$parameters);
|
14 |
-
/**
|
15 |
-
* Remove a cookie from the queue.
|
16 |
-
*
|
17 |
-
* @param string $name
|
18 |
-
* @param string|null $path
|
19 |
-
* @return void
|
20 |
-
*/
|
21 |
-
public function unqueue($name, $path = null);
|
22 |
-
/**
|
23 |
-
* Get the cookies which have been queued for the next request.
|
24 |
-
*
|
25 |
-
* @return array
|
26 |
-
*/
|
27 |
-
public function getQueuedCookies();
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Database/Eloquent/Castable.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Database\Eloquent;
|
4 |
-
|
5 |
-
interface Castable
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the name of the caster class to use when casting from / to this cast target.
|
9 |
-
*
|
10 |
-
* @param array $arguments
|
11 |
-
* @return string
|
12 |
-
* @return string|\Illuminate\Contracts\Database\Eloquent\CastsAttributes|\Illuminate\Contracts\Database\Eloquent\CastsInboundAttributes
|
13 |
-
*/
|
14 |
-
public static function castUsing(array $arguments);
|
15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Database/Eloquent/CastsAttributes.php
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Database\Eloquent;
|
4 |
-
|
5 |
-
interface CastsAttributes
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Transform the attribute from the underlying model values.
|
9 |
-
*
|
10 |
-
* @param \Illuminate\Database\Eloquent\Model $model
|
11 |
-
* @param string $key
|
12 |
-
* @param mixed $value
|
13 |
-
* @param array $attributes
|
14 |
-
* @return mixed
|
15 |
-
*/
|
16 |
-
public function get($model, string $key, $value, array $attributes);
|
17 |
-
/**
|
18 |
-
* Transform the attribute to its underlying model values.
|
19 |
-
*
|
20 |
-
* @param \Illuminate\Database\Eloquent\Model $model
|
21 |
-
* @param string $key
|
22 |
-
* @param mixed $value
|
23 |
-
* @param array $attributes
|
24 |
-
* @return mixed
|
25 |
-
*/
|
26 |
-
public function set($model, string $key, $value, array $attributes);
|
27 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Database/Eloquent/CastsInboundAttributes.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Database\Eloquent;
|
4 |
-
|
5 |
-
interface CastsInboundAttributes
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Transform the attribute to its underlying model values.
|
9 |
-
*
|
10 |
-
* @param \Illuminate\Database\Eloquent\Model $model
|
11 |
-
* @param string $key
|
12 |
-
* @param mixed $value
|
13 |
-
* @param array $attributes
|
14 |
-
* @return mixed
|
15 |
-
*/
|
16 |
-
public function set($model, string $key, $value, array $attributes);
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Database/Eloquent/DeviatesCastableAttributes.php
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Database\Eloquent;
|
4 |
-
|
5 |
-
interface DeviatesCastableAttributes
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Increment the attribute.
|
9 |
-
*
|
10 |
-
* @param \Illuminate\Database\Eloquent\Model $model
|
11 |
-
* @param string $key
|
12 |
-
* @param mixed $value
|
13 |
-
* @param array $attributes
|
14 |
-
* @return mixed
|
15 |
-
*/
|
16 |
-
public function increment($model, string $key, $value, array $attributes);
|
17 |
-
/**
|
18 |
-
* Decrement the attribute.
|
19 |
-
*
|
20 |
-
* @param \Illuminate\Database\Eloquent\Model $model
|
21 |
-
* @param string $key
|
22 |
-
* @param mixed $value
|
23 |
-
* @param array $attributes
|
24 |
-
* @return mixed
|
25 |
-
*/
|
26 |
-
public function decrement($model, string $key, $value, array $attributes);
|
27 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Database/Eloquent/SerializesCastableAttributes.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Database\Eloquent;
|
4 |
-
|
5 |
-
interface SerializesCastableAttributes
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Serialize the attribute when converting the model to an array.
|
9 |
-
*
|
10 |
-
* @param \Illuminate\Database\Eloquent\Model $model
|
11 |
-
* @param string $key
|
12 |
-
* @param mixed $value
|
13 |
-
* @param array $attributes
|
14 |
-
* @return mixed
|
15 |
-
*/
|
16 |
-
public function serialize($model, string $key, $value, array $attributes);
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Database/Eloquent/SupportsPartialRelations.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Database\Eloquent;
|
4 |
-
|
5 |
-
interface SupportsPartialRelations
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Indicate that the relation is a single result of a larger one-to-many relationship.
|
9 |
-
*
|
10 |
-
* @param string|null $column
|
11 |
-
* @param string|\Closure|null $aggregate
|
12 |
-
* @param string $relation
|
13 |
-
* @return $this
|
14 |
-
*/
|
15 |
-
public function ofMany($column = 'id', $aggregate = 'MAX', $relation = null);
|
16 |
-
/**
|
17 |
-
* Determine whether the relationship is a one-of-many relationship.
|
18 |
-
*
|
19 |
-
* @return bool
|
20 |
-
*/
|
21 |
-
public function isOneOfMany();
|
22 |
-
/**
|
23 |
-
* Get the one of many inner join subselect query builder instance.
|
24 |
-
*
|
25 |
-
* @return \Illuminate\Database\Eloquent\Builder|void
|
26 |
-
*/
|
27 |
-
public function getOneOfManySubQuery();
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Database/Events/MigrationEvent.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Database\Events;
|
4 |
-
|
5 |
-
interface MigrationEvent
|
6 |
-
{
|
7 |
-
//
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Database/ModelIdentifier.php
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Database;
|
4 |
-
|
5 |
-
class ModelIdentifier
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* The class name of the model.
|
9 |
-
*
|
10 |
-
* @var string
|
11 |
-
*/
|
12 |
-
public $class;
|
13 |
-
/**
|
14 |
-
* The unique identifier of the model.
|
15 |
-
*
|
16 |
-
* This may be either a single ID or an array of IDs.
|
17 |
-
*
|
18 |
-
* @var mixed
|
19 |
-
*/
|
20 |
-
public $id;
|
21 |
-
/**
|
22 |
-
* The relationships loaded on the model.
|
23 |
-
*
|
24 |
-
* @var array
|
25 |
-
*/
|
26 |
-
public $relations;
|
27 |
-
/**
|
28 |
-
* The connection name of the model.
|
29 |
-
*
|
30 |
-
* @var string|null
|
31 |
-
*/
|
32 |
-
public $connection;
|
33 |
-
/**
|
34 |
-
* Create a new model identifier.
|
35 |
-
*
|
36 |
-
* @param string $class
|
37 |
-
* @param mixed $id
|
38 |
-
* @param array $relations
|
39 |
-
* @param mixed $connection
|
40 |
-
* @return void
|
41 |
-
*/
|
42 |
-
public function __construct($class, $id, array $relations, $connection)
|
43 |
-
{
|
44 |
-
$this->id = $id;
|
45 |
-
$this->class = $class;
|
46 |
-
$this->relations = $relations;
|
47 |
-
$this->connection = $connection;
|
48 |
-
}
|
49 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Debug/ExceptionHandler.php
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Debug;
|
4 |
-
|
5 |
-
use Throwable;
|
6 |
-
interface ExceptionHandler
|
7 |
-
{
|
8 |
-
/**
|
9 |
-
* Report or log an exception.
|
10 |
-
*
|
11 |
-
* @param \Throwable $e
|
12 |
-
* @return void
|
13 |
-
*
|
14 |
-
* @throws \Throwable
|
15 |
-
*/
|
16 |
-
public function report(Throwable $e);
|
17 |
-
/**
|
18 |
-
* Determine if the exception should be reported.
|
19 |
-
*
|
20 |
-
* @param \Throwable $e
|
21 |
-
* @return bool
|
22 |
-
*/
|
23 |
-
public function shouldReport(Throwable $e);
|
24 |
-
/**
|
25 |
-
* Render an exception into an HTTP response.
|
26 |
-
*
|
27 |
-
* @param \Illuminate\Http\Request $request
|
28 |
-
* @param \Throwable $e
|
29 |
-
* @return \Symfony\Component\HttpFoundation\Response
|
30 |
-
*
|
31 |
-
* @throws \Throwable
|
32 |
-
*/
|
33 |
-
public function render($request, Throwable $e);
|
34 |
-
/**
|
35 |
-
* Render an exception to the console.
|
36 |
-
*
|
37 |
-
* @param \Symfony\Component\Console\Output\OutputInterface $output
|
38 |
-
* @param \Throwable $e
|
39 |
-
* @return void
|
40 |
-
*/
|
41 |
-
public function renderForConsole($output, Throwable $e);
|
42 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Encryption/DecryptException.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Encryption;
|
4 |
-
|
5 |
-
use RuntimeException;
|
6 |
-
class DecryptException extends RuntimeException
|
7 |
-
{
|
8 |
-
//
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Encryption/EncryptException.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Encryption;
|
4 |
-
|
5 |
-
use RuntimeException;
|
6 |
-
class EncryptException extends RuntimeException
|
7 |
-
{
|
8 |
-
//
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Encryption/Encrypter.php
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Encryption;
|
4 |
-
|
5 |
-
interface Encrypter
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Encrypt the given value.
|
9 |
-
*
|
10 |
-
* @param mixed $value
|
11 |
-
* @param bool $serialize
|
12 |
-
* @return string
|
13 |
-
*
|
14 |
-
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
15 |
-
*/
|
16 |
-
public function encrypt($value, $serialize = \true);
|
17 |
-
/**
|
18 |
-
* Decrypt the given value.
|
19 |
-
*
|
20 |
-
* @param string $payload
|
21 |
-
* @param bool $unserialize
|
22 |
-
* @return mixed
|
23 |
-
*
|
24 |
-
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
25 |
-
*/
|
26 |
-
public function decrypt($payload, $unserialize = \true);
|
27 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Encryption/StringEncrypter.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Encryption;
|
4 |
-
|
5 |
-
interface StringEncrypter
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Encrypt a string without serialization.
|
9 |
-
*
|
10 |
-
* @param string $value
|
11 |
-
* @return string
|
12 |
-
*
|
13 |
-
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
14 |
-
*/
|
15 |
-
public function encryptString($value);
|
16 |
-
/**
|
17 |
-
* Decrypt the given string without unserialization.
|
18 |
-
*
|
19 |
-
* @param string $payload
|
20 |
-
* @return string
|
21 |
-
*
|
22 |
-
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
23 |
-
*/
|
24 |
-
public function decryptString($payload);
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Events/Dispatcher.php
DELETED
@@ -1,74 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Events;
|
4 |
-
|
5 |
-
interface Dispatcher
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Register an event listener with the dispatcher.
|
9 |
-
*
|
10 |
-
* @param \Closure|string|array $events
|
11 |
-
* @param \Closure|string|array|null $listener
|
12 |
-
* @return void
|
13 |
-
*/
|
14 |
-
public function listen($events, $listener = null);
|
15 |
-
/**
|
16 |
-
* Determine if a given event has listeners.
|
17 |
-
*
|
18 |
-
* @param string $eventName
|
19 |
-
* @return bool
|
20 |
-
*/
|
21 |
-
public function hasListeners($eventName);
|
22 |
-
/**
|
23 |
-
* Register an event subscriber with the dispatcher.
|
24 |
-
*
|
25 |
-
* @param object|string $subscriber
|
26 |
-
* @return void
|
27 |
-
*/
|
28 |
-
public function subscribe($subscriber);
|
29 |
-
/**
|
30 |
-
* Dispatch an event until the first non-null response is returned.
|
31 |
-
*
|
32 |
-
* @param string|object $event
|
33 |
-
* @param mixed $payload
|
34 |
-
* @return array|null
|
35 |
-
*/
|
36 |
-
public function until($event, $payload = []);
|
37 |
-
/**
|
38 |
-
* Dispatch an event and call the listeners.
|
39 |
-
*
|
40 |
-
* @param string|object $event
|
41 |
-
* @param mixed $payload
|
42 |
-
* @param bool $halt
|
43 |
-
* @return array|null
|
44 |
-
*/
|
45 |
-
public function dispatch($event, $payload = [], $halt = \false);
|
46 |
-
/**
|
47 |
-
* Register an event and payload to be fired later.
|
48 |
-
*
|
49 |
-
* @param string $event
|
50 |
-
* @param array $payload
|
51 |
-
* @return void
|
52 |
-
*/
|
53 |
-
public function push($event, $payload = []);
|
54 |
-
/**
|
55 |
-
* Flush a set of pushed events.
|
56 |
-
*
|
57 |
-
* @param string $event
|
58 |
-
* @return void
|
59 |
-
*/
|
60 |
-
public function flush($event);
|
61 |
-
/**
|
62 |
-
* Remove a set of listeners from the dispatcher.
|
63 |
-
*
|
64 |
-
* @param string $event
|
65 |
-
* @return void
|
66 |
-
*/
|
67 |
-
public function forget($event);
|
68 |
-
/**
|
69 |
-
* Forget all of the queued listeners.
|
70 |
-
*
|
71 |
-
* @return void
|
72 |
-
*/
|
73 |
-
public function forgetPushed();
|
74 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Filesystem/Cloud.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Filesystem;
|
4 |
-
|
5 |
-
interface Cloud extends Filesystem
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the URL for the file at the given path.
|
9 |
-
*
|
10 |
-
* @param string $path
|
11 |
-
* @return string
|
12 |
-
*/
|
13 |
-
public function url($path);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Filesystem/Factory.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Filesystem;
|
4 |
-
|
5 |
-
interface Factory
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get a filesystem implementation.
|
9 |
-
*
|
10 |
-
* @param string|null $name
|
11 |
-
* @return \Illuminate\Contracts\Filesystem\Filesystem
|
12 |
-
*/
|
13 |
-
public function disk($name = null);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Filesystem/FileExistsException.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Filesystem;
|
4 |
-
|
5 |
-
use Exception;
|
6 |
-
class FileExistsException extends Exception
|
7 |
-
{
|
8 |
-
//
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Filesystem/FileNotFoundException.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Filesystem;
|
4 |
-
|
5 |
-
use Exception;
|
6 |
-
class FileNotFoundException extends Exception
|
7 |
-
{
|
8 |
-
//
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Filesystem/Filesystem.php
DELETED
@@ -1,177 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Filesystem;
|
4 |
-
|
5 |
-
interface Filesystem
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* The public visibility setting.
|
9 |
-
*
|
10 |
-
* @var string
|
11 |
-
*/
|
12 |
-
const VISIBILITY_PUBLIC = 'public';
|
13 |
-
/**
|
14 |
-
* The private visibility setting.
|
15 |
-
*
|
16 |
-
* @var string
|
17 |
-
*/
|
18 |
-
const VISIBILITY_PRIVATE = 'private';
|
19 |
-
/**
|
20 |
-
* Determine if a file exists.
|
21 |
-
*
|
22 |
-
* @param string $path
|
23 |
-
* @return bool
|
24 |
-
*/
|
25 |
-
public function exists($path);
|
26 |
-
/**
|
27 |
-
* Get the contents of a file.
|
28 |
-
*
|
29 |
-
* @param string $path
|
30 |
-
* @return string
|
31 |
-
*
|
32 |
-
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
33 |
-
*/
|
34 |
-
public function get($path);
|
35 |
-
/**
|
36 |
-
* Get a resource to read the file.
|
37 |
-
*
|
38 |
-
* @param string $path
|
39 |
-
* @return resource|null The path resource or null on failure.
|
40 |
-
*
|
41 |
-
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
42 |
-
*/
|
43 |
-
public function readStream($path);
|
44 |
-
/**
|
45 |
-
* Write the contents of a file.
|
46 |
-
*
|
47 |
-
* @param string $path
|
48 |
-
* @param string|resource $contents
|
49 |
-
* @param mixed $options
|
50 |
-
* @return bool
|
51 |
-
*/
|
52 |
-
public function put($path, $contents, $options = []);
|
53 |
-
/**
|
54 |
-
* Write a new file using a stream.
|
55 |
-
*
|
56 |
-
* @param string $path
|
57 |
-
* @param resource $resource
|
58 |
-
* @param array $options
|
59 |
-
* @return bool
|
60 |
-
*
|
61 |
-
* @throws \InvalidArgumentException If $resource is not a file handle.
|
62 |
-
* @throws \Illuminate\Contracts\Filesystem\FileExistsException
|
63 |
-
*/
|
64 |
-
public function writeStream($path, $resource, array $options = []);
|
65 |
-
/**
|
66 |
-
* Get the visibility for the given path.
|
67 |
-
*
|
68 |
-
* @param string $path
|
69 |
-
* @return string
|
70 |
-
*/
|
71 |
-
public function getVisibility($path);
|
72 |
-
/**
|
73 |
-
* Set the visibility for the given path.
|
74 |
-
*
|
75 |
-
* @param string $path
|
76 |
-
* @param string $visibility
|
77 |
-
* @return bool
|
78 |
-
*/
|
79 |
-
public function setVisibility($path, $visibility);
|
80 |
-
/**
|
81 |
-
* Prepend to a file.
|
82 |
-
*
|
83 |
-
* @param string $path
|
84 |
-
* @param string $data
|
85 |
-
* @return bool
|
86 |
-
*/
|
87 |
-
public function prepend($path, $data);
|
88 |
-
/**
|
89 |
-
* Append to a file.
|
90 |
-
*
|
91 |
-
* @param string $path
|
92 |
-
* @param string $data
|
93 |
-
* @return bool
|
94 |
-
*/
|
95 |
-
public function append($path, $data);
|
96 |
-
/**
|
97 |
-
* Delete the file at a given path.
|
98 |
-
*
|
99 |
-
* @param string|array $paths
|
100 |
-
* @return bool
|
101 |
-
*/
|
102 |
-
public function delete($paths);
|
103 |
-
/**
|
104 |
-
* Copy a file to a new location.
|
105 |
-
*
|
106 |
-
* @param string $from
|
107 |
-
* @param string $to
|
108 |
-
* @return bool
|
109 |
-
*/
|
110 |
-
public function copy($from, $to);
|
111 |
-
/**
|
112 |
-
* Move a file to a new location.
|
113 |
-
*
|
114 |
-
* @param string $from
|
115 |
-
* @param string $to
|
116 |
-
* @return bool
|
117 |
-
*/
|
118 |
-
public function move($from, $to);
|
119 |
-
/**
|
120 |
-
* Get the file size of a given file.
|
121 |
-
*
|
122 |
-
* @param string $path
|
123 |
-
* @return int
|
124 |
-
*/
|
125 |
-
public function size($path);
|
126 |
-
/**
|
127 |
-
* Get the file's last modification time.
|
128 |
-
*
|
129 |
-
* @param string $path
|
130 |
-
* @return int
|
131 |
-
*/
|
132 |
-
public function lastModified($path);
|
133 |
-
/**
|
134 |
-
* Get an array of all files in a directory.
|
135 |
-
*
|
136 |
-
* @param string|null $directory
|
137 |
-
* @param bool $recursive
|
138 |
-
* @return array
|
139 |
-
*/
|
140 |
-
public function files($directory = null, $recursive = \false);
|
141 |
-
/**
|
142 |
-
* Get all of the files from the given directory (recursive).
|
143 |
-
*
|
144 |
-
* @param string|null $directory
|
145 |
-
* @return array
|
146 |
-
*/
|
147 |
-
public function allFiles($directory = null);
|
148 |
-
/**
|
149 |
-
* Get all of the directories within a given directory.
|
150 |
-
*
|
151 |
-
* @param string|null $directory
|
152 |
-
* @param bool $recursive
|
153 |
-
* @return array
|
154 |
-
*/
|
155 |
-
public function directories($directory = null, $recursive = \false);
|
156 |
-
/**
|
157 |
-
* Get all (recursive) of the directories within a given directory.
|
158 |
-
*
|
159 |
-
* @param string|null $directory
|
160 |
-
* @return array
|
161 |
-
*/
|
162 |
-
public function allDirectories($directory = null);
|
163 |
-
/**
|
164 |
-
* Create a directory.
|
165 |
-
*
|
166 |
-
* @param string $path
|
167 |
-
* @return bool
|
168 |
-
*/
|
169 |
-
public function makeDirectory($path);
|
170 |
-
/**
|
171 |
-
* Recursively delete a directory.
|
172 |
-
*
|
173 |
-
* @param string $directory
|
174 |
-
* @return bool
|
175 |
-
*/
|
176 |
-
public function deleteDirectory($directory);
|
177 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Filesystem/LockTimeoutException.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Filesystem;
|
4 |
-
|
5 |
-
use Exception;
|
6 |
-
class LockTimeoutException extends Exception
|
7 |
-
{
|
8 |
-
//
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Foundation/Application.php
DELETED
@@ -1,188 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Foundation;
|
4 |
-
|
5 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Container\Container;
|
6 |
-
interface Application extends Container
|
7 |
-
{
|
8 |
-
/**
|
9 |
-
* Get the version number of the application.
|
10 |
-
*
|
11 |
-
* @return string
|
12 |
-
*/
|
13 |
-
public function version();
|
14 |
-
/**
|
15 |
-
* Get the base path of the Laravel installation.
|
16 |
-
*
|
17 |
-
* @param string $path
|
18 |
-
* @return string
|
19 |
-
*/
|
20 |
-
public function basePath($path = '');
|
21 |
-
/**
|
22 |
-
* Get the path to the bootstrap directory.
|
23 |
-
*
|
24 |
-
* @param string $path
|
25 |
-
* @return string
|
26 |
-
*/
|
27 |
-
public function bootstrapPath($path = '');
|
28 |
-
/**
|
29 |
-
* Get the path to the application configuration files.
|
30 |
-
*
|
31 |
-
* @param string $path
|
32 |
-
* @return string
|
33 |
-
*/
|
34 |
-
public function configPath($path = '');
|
35 |
-
/**
|
36 |
-
* Get the path to the database directory.
|
37 |
-
*
|
38 |
-
* @param string $path
|
39 |
-
* @return string
|
40 |
-
*/
|
41 |
-
public function databasePath($path = '');
|
42 |
-
/**
|
43 |
-
* Get the path to the resources directory.
|
44 |
-
*
|
45 |
-
* @param string $path
|
46 |
-
* @return string
|
47 |
-
*/
|
48 |
-
public function resourcePath($path = '');
|
49 |
-
/**
|
50 |
-
* Get the path to the storage directory.
|
51 |
-
*
|
52 |
-
* @return string
|
53 |
-
*/
|
54 |
-
public function storagePath();
|
55 |
-
/**
|
56 |
-
* Get or check the current application environment.
|
57 |
-
*
|
58 |
-
* @param string|array $environments
|
59 |
-
* @return string|bool
|
60 |
-
*/
|
61 |
-
public function environment(...$environments);
|
62 |
-
/**
|
63 |
-
* Determine if the application is running in the console.
|
64 |
-
*
|
65 |
-
* @return bool
|
66 |
-
*/
|
67 |
-
public function runningInConsole();
|
68 |
-
/**
|
69 |
-
* Determine if the application is running unit tests.
|
70 |
-
*
|
71 |
-
* @return bool
|
72 |
-
*/
|
73 |
-
public function runningUnitTests();
|
74 |
-
/**
|
75 |
-
* Determine if the application is currently down for maintenance.
|
76 |
-
*
|
77 |
-
* @return bool
|
78 |
-
*/
|
79 |
-
public function isDownForMaintenance();
|
80 |
-
/**
|
81 |
-
* Register all of the configured providers.
|
82 |
-
*
|
83 |
-
* @return void
|
84 |
-
*/
|
85 |
-
public function registerConfiguredProviders();
|
86 |
-
/**
|
87 |
-
* Register a service provider with the application.
|
88 |
-
*
|
89 |
-
* @param \Illuminate\Support\ServiceProvider|string $provider
|
90 |
-
* @param bool $force
|
91 |
-
* @return \Illuminate\Support\ServiceProvider
|
92 |
-
*/
|
93 |
-
public function register($provider, $force = \false);
|
94 |
-
/**
|
95 |
-
* Register a deferred provider and service.
|
96 |
-
*
|
97 |
-
* @param string $provider
|
98 |
-
* @param string|null $service
|
99 |
-
* @return void
|
100 |
-
*/
|
101 |
-
public function registerDeferredProvider($provider, $service = null);
|
102 |
-
/**
|
103 |
-
* Resolve a service provider instance from the class name.
|
104 |
-
*
|
105 |
-
* @param string $provider
|
106 |
-
* @return \Illuminate\Support\ServiceProvider
|
107 |
-
*/
|
108 |
-
public function resolveProvider($provider);
|
109 |
-
/**
|
110 |
-
* Boot the application's service providers.
|
111 |
-
*
|
112 |
-
* @return void
|
113 |
-
*/
|
114 |
-
public function boot();
|
115 |
-
/**
|
116 |
-
* Register a new boot listener.
|
117 |
-
*
|
118 |
-
* @param callable $callback
|
119 |
-
* @return void
|
120 |
-
*/
|
121 |
-
public function booting($callback);
|
122 |
-
/**
|
123 |
-
* Register a new "booted" listener.
|
124 |
-
*
|
125 |
-
* @param callable $callback
|
126 |
-
* @return void
|
127 |
-
*/
|
128 |
-
public function booted($callback);
|
129 |
-
/**
|
130 |
-
* Run the given array of bootstrap classes.
|
131 |
-
*
|
132 |
-
* @param array $bootstrappers
|
133 |
-
* @return void
|
134 |
-
*/
|
135 |
-
public function bootstrapWith(array $bootstrappers);
|
136 |
-
/**
|
137 |
-
* Get the current application locale.
|
138 |
-
*
|
139 |
-
* @return string
|
140 |
-
*/
|
141 |
-
public function getLocale();
|
142 |
-
/**
|
143 |
-
* Get the application namespace.
|
144 |
-
*
|
145 |
-
* @return string
|
146 |
-
*
|
147 |
-
* @throws \RuntimeException
|
148 |
-
*/
|
149 |
-
public function getNamespace();
|
150 |
-
/**
|
151 |
-
* Get the registered service provider instances if any exist.
|
152 |
-
*
|
153 |
-
* @param \Illuminate\Support\ServiceProvider|string $provider
|
154 |
-
* @return array
|
155 |
-
*/
|
156 |
-
public function getProviders($provider);
|
157 |
-
/**
|
158 |
-
* Determine if the application has been bootstrapped before.
|
159 |
-
*
|
160 |
-
* @return bool
|
161 |
-
*/
|
162 |
-
public function hasBeenBootstrapped();
|
163 |
-
/**
|
164 |
-
* Load and boot all of the remaining deferred providers.
|
165 |
-
*
|
166 |
-
* @return void
|
167 |
-
*/
|
168 |
-
public function loadDeferredProviders();
|
169 |
-
/**
|
170 |
-
* Set the current application locale.
|
171 |
-
*
|
172 |
-
* @param string $locale
|
173 |
-
* @return void
|
174 |
-
*/
|
175 |
-
public function setLocale($locale);
|
176 |
-
/**
|
177 |
-
* Determine if middleware has been disabled for the application.
|
178 |
-
*
|
179 |
-
* @return bool
|
180 |
-
*/
|
181 |
-
public function shouldSkipMiddleware();
|
182 |
-
/**
|
183 |
-
* Terminate the application.
|
184 |
-
*
|
185 |
-
* @return void
|
186 |
-
*/
|
187 |
-
public function terminate();
|
188 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Foundation/CachesConfiguration.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Foundation;
|
4 |
-
|
5 |
-
interface CachesConfiguration
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Determine if the application configuration is cached.
|
9 |
-
*
|
10 |
-
* @return bool
|
11 |
-
*/
|
12 |
-
public function configurationIsCached();
|
13 |
-
/**
|
14 |
-
* Get the path to the configuration cache file.
|
15 |
-
*
|
16 |
-
* @return string
|
17 |
-
*/
|
18 |
-
public function getCachedConfigPath();
|
19 |
-
/**
|
20 |
-
* Get the path to the cached services.php file.
|
21 |
-
*
|
22 |
-
* @return string
|
23 |
-
*/
|
24 |
-
public function getCachedServicesPath();
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Foundation/CachesRoutes.php
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Foundation;
|
4 |
-
|
5 |
-
interface CachesRoutes
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Determine if the application routes are cached.
|
9 |
-
*
|
10 |
-
* @return bool
|
11 |
-
*/
|
12 |
-
public function routesAreCached();
|
13 |
-
/**
|
14 |
-
* Get the path to the routes cache file.
|
15 |
-
*
|
16 |
-
* @return string
|
17 |
-
*/
|
18 |
-
public function getCachedRoutesPath();
|
19 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Hashing/Hasher.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Hashing;
|
4 |
-
|
5 |
-
interface Hasher
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get information about the given hashed value.
|
9 |
-
*
|
10 |
-
* @param string $hashedValue
|
11 |
-
* @return array
|
12 |
-
*/
|
13 |
-
public function info($hashedValue);
|
14 |
-
/**
|
15 |
-
* Hash the given value.
|
16 |
-
*
|
17 |
-
* @param string $value
|
18 |
-
* @param array $options
|
19 |
-
* @return string
|
20 |
-
*/
|
21 |
-
public function make($value, array $options = []);
|
22 |
-
/**
|
23 |
-
* Check the given plain value against a hash.
|
24 |
-
*
|
25 |
-
* @param string $value
|
26 |
-
* @param string $hashedValue
|
27 |
-
* @param array $options
|
28 |
-
* @return bool
|
29 |
-
*/
|
30 |
-
public function check($value, $hashedValue, array $options = []);
|
31 |
-
/**
|
32 |
-
* Check if the given hash has been hashed using the given options.
|
33 |
-
*
|
34 |
-
* @param string $hashedValue
|
35 |
-
* @param array $options
|
36 |
-
* @return bool
|
37 |
-
*/
|
38 |
-
public function needsRehash($hashedValue, array $options = []);
|
39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Http/Kernel.php
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Http;
|
4 |
-
|
5 |
-
interface Kernel
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Bootstrap the application for HTTP requests.
|
9 |
-
*
|
10 |
-
* @return void
|
11 |
-
*/
|
12 |
-
public function bootstrap();
|
13 |
-
/**
|
14 |
-
* Handle an incoming HTTP request.
|
15 |
-
*
|
16 |
-
* @param \Symfony\Component\HttpFoundation\Request $request
|
17 |
-
* @return \Symfony\Component\HttpFoundation\Response
|
18 |
-
*/
|
19 |
-
public function handle($request);
|
20 |
-
/**
|
21 |
-
* Perform any final actions for the request lifecycle.
|
22 |
-
*
|
23 |
-
* @param \Symfony\Component\HttpFoundation\Request $request
|
24 |
-
* @param \Symfony\Component\HttpFoundation\Response $response
|
25 |
-
* @return void
|
26 |
-
*/
|
27 |
-
public function terminate($request, $response);
|
28 |
-
/**
|
29 |
-
* Get the Laravel application instance.
|
30 |
-
*
|
31 |
-
* @return \Illuminate\Contracts\Foundation\Application
|
32 |
-
*/
|
33 |
-
public function getApplication();
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Mail/Factory.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Mail;
|
4 |
-
|
5 |
-
interface Factory
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get a mailer instance by name.
|
9 |
-
*
|
10 |
-
* @param string|null $name
|
11 |
-
* @return \Illuminate\Contracts\Mail\Mailer
|
12 |
-
*/
|
13 |
-
public function mailer($name = null);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Mail/MailQueue.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Mail;
|
4 |
-
|
5 |
-
interface MailQueue
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Queue a new e-mail message for sending.
|
9 |
-
*
|
10 |
-
* @param \Illuminate\Contracts\Mail\Mailable|string|array $view
|
11 |
-
* @param string|null $queue
|
12 |
-
* @return mixed
|
13 |
-
*/
|
14 |
-
public function queue($view, $queue = null);
|
15 |
-
/**
|
16 |
-
* Queue a new e-mail message for sending after (n) seconds.
|
17 |
-
*
|
18 |
-
* @param \DateTimeInterface|\DateInterval|int $delay
|
19 |
-
* @param \Illuminate\Contracts\Mail\Mailable|string|array $view
|
20 |
-
* @param string|null $queue
|
21 |
-
* @return mixed
|
22 |
-
*/
|
23 |
-
public function later($delay, $view, $queue = null);
|
24 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Mail/Mailable.php
DELETED
@@ -1,68 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Mail;
|
4 |
-
|
5 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Queue\Factory as Queue;
|
6 |
-
interface Mailable
|
7 |
-
{
|
8 |
-
/**
|
9 |
-
* Send the message using the given mailer.
|
10 |
-
*
|
11 |
-
* @param \Illuminate\Contracts\Mail\Factory|\Illuminate\Contracts\Mail\Mailer $mailer
|
12 |
-
* @return void
|
13 |
-
*/
|
14 |
-
public function send($mailer);
|
15 |
-
/**
|
16 |
-
* Queue the given message.
|
17 |
-
*
|
18 |
-
* @param \Illuminate\Contracts\Queue\Factory $queue
|
19 |
-
* @return mixed
|
20 |
-
*/
|
21 |
-
public function queue(Queue $queue);
|
22 |
-
/**
|
23 |
-
* Deliver the queued message after the given delay.
|
24 |
-
*
|
25 |
-
* @param \DateTimeInterface|\DateInterval|int $delay
|
26 |
-
* @param \Illuminate\Contracts\Queue\Factory $queue
|
27 |
-
* @return mixed
|
28 |
-
*/
|
29 |
-
public function later($delay, Queue $queue);
|
30 |
-
/**
|
31 |
-
* Set the recipients of the message.
|
32 |
-
*
|
33 |
-
* @param object|array|string $address
|
34 |
-
* @param string|null $name
|
35 |
-
* @return self
|
36 |
-
*/
|
37 |
-
public function cc($address, $name = null);
|
38 |
-
/**
|
39 |
-
* Set the recipients of the message.
|
40 |
-
*
|
41 |
-
* @param object|array|string $address
|
42 |
-
* @param string|null $name
|
43 |
-
* @return $this
|
44 |
-
*/
|
45 |
-
public function bcc($address, $name = null);
|
46 |
-
/**
|
47 |
-
* Set the recipients of the message.
|
48 |
-
*
|
49 |
-
* @param object|array|string $address
|
50 |
-
* @param string|null $name
|
51 |
-
* @return $this
|
52 |
-
*/
|
53 |
-
public function to($address, $name = null);
|
54 |
-
/**
|
55 |
-
* Set the locale of the message.
|
56 |
-
*
|
57 |
-
* @param string $locale
|
58 |
-
* @return $this
|
59 |
-
*/
|
60 |
-
public function locale($locale);
|
61 |
-
/**
|
62 |
-
* Set the name of the mailer that should be used to send the message.
|
63 |
-
*
|
64 |
-
* @param string $mailer
|
65 |
-
* @return $this
|
66 |
-
*/
|
67 |
-
public function mailer($mailer);
|
68 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Mail/Mailer.php
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Mail;
|
4 |
-
|
5 |
-
interface Mailer
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Begin the process of mailing a mailable class instance.
|
9 |
-
*
|
10 |
-
* @param mixed $users
|
11 |
-
* @return \Illuminate\Mail\PendingMail
|
12 |
-
*/
|
13 |
-
public function to($users);
|
14 |
-
/**
|
15 |
-
* Begin the process of mailing a mailable class instance.
|
16 |
-
*
|
17 |
-
* @param mixed $users
|
18 |
-
* @return \Illuminate\Mail\PendingMail
|
19 |
-
*/
|
20 |
-
public function bcc($users);
|
21 |
-
/**
|
22 |
-
* Send a new message with only a raw text part.
|
23 |
-
*
|
24 |
-
* @param string $text
|
25 |
-
* @param mixed $callback
|
26 |
-
* @return void
|
27 |
-
*/
|
28 |
-
public function raw($text, $callback);
|
29 |
-
/**
|
30 |
-
* Send a new message using a view.
|
31 |
-
*
|
32 |
-
* @param \Illuminate\Contracts\Mail\Mailable|string|array $view
|
33 |
-
* @param array $data
|
34 |
-
* @param \Closure|string|null $callback
|
35 |
-
* @return void
|
36 |
-
*/
|
37 |
-
public function send($view, array $data = [], $callback = null);
|
38 |
-
/**
|
39 |
-
* Get the array of failed recipients.
|
40 |
-
*
|
41 |
-
* @return array
|
42 |
-
*/
|
43 |
-
public function failures();
|
44 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Notifications/Dispatcher.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Notifications;
|
4 |
-
|
5 |
-
interface Dispatcher
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Send the given notification to the given notifiable entities.
|
9 |
-
*
|
10 |
-
* @param \Illuminate\Support\Collection|array|mixed $notifiables
|
11 |
-
* @param mixed $notification
|
12 |
-
* @return void
|
13 |
-
*/
|
14 |
-
public function send($notifiables, $notification);
|
15 |
-
/**
|
16 |
-
* Send the given notification immediately.
|
17 |
-
*
|
18 |
-
* @param \Illuminate\Support\Collection|array|mixed $notifiables
|
19 |
-
* @param mixed $notification
|
20 |
-
* @return void
|
21 |
-
*/
|
22 |
-
public function sendNow($notifiables, $notification);
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Notifications/Factory.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Notifications;
|
4 |
-
|
5 |
-
interface Factory
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get a channel instance by name.
|
9 |
-
*
|
10 |
-
* @param string|null $name
|
11 |
-
* @return mixed
|
12 |
-
*/
|
13 |
-
public function channel($name = null);
|
14 |
-
/**
|
15 |
-
* Send the given notification to the given notifiable entities.
|
16 |
-
*
|
17 |
-
* @param \Illuminate\Support\Collection|array|mixed $notifiables
|
18 |
-
* @param mixed $notification
|
19 |
-
* @return void
|
20 |
-
*/
|
21 |
-
public function send($notifiables, $notification);
|
22 |
-
/**
|
23 |
-
* Send the given notification immediately.
|
24 |
-
*
|
25 |
-
* @param \Illuminate\Support\Collection|array|mixed $notifiables
|
26 |
-
* @param mixed $notification
|
27 |
-
* @return void
|
28 |
-
*/
|
29 |
-
public function sendNow($notifiables, $notification);
|
30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Pagination/CursorPaginator.php
DELETED
@@ -1,103 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Pagination;
|
4 |
-
|
5 |
-
interface CursorPaginator
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the URL for a given cursor.
|
9 |
-
*
|
10 |
-
* @param \Illuminate\Pagination\Cursor|null $cursor
|
11 |
-
* @return string
|
12 |
-
*/
|
13 |
-
public function url($cursor);
|
14 |
-
/**
|
15 |
-
* Add a set of query string values to the paginator.
|
16 |
-
*
|
17 |
-
* @param array|string|null $key
|
18 |
-
* @param string|null $value
|
19 |
-
* @return $this
|
20 |
-
*/
|
21 |
-
public function appends($key, $value = null);
|
22 |
-
/**
|
23 |
-
* Get / set the URL fragment to be appended to URLs.
|
24 |
-
*
|
25 |
-
* @param string|null $fragment
|
26 |
-
* @return $this|string|null
|
27 |
-
*/
|
28 |
-
public function fragment($fragment = null);
|
29 |
-
/**
|
30 |
-
* Get the URL for the previous page, or null.
|
31 |
-
*
|
32 |
-
* @return string|null
|
33 |
-
*/
|
34 |
-
public function previousPageUrl();
|
35 |
-
/**
|
36 |
-
* The URL for the next page, or null.
|
37 |
-
*
|
38 |
-
* @return string|null
|
39 |
-
*/
|
40 |
-
public function nextPageUrl();
|
41 |
-
/**
|
42 |
-
* Get all of the items being paginated.
|
43 |
-
*
|
44 |
-
* @return array
|
45 |
-
*/
|
46 |
-
public function items();
|
47 |
-
/**
|
48 |
-
* Get the "cursor" of the previous set of items.
|
49 |
-
*
|
50 |
-
* @return \Illuminate\Pagination\Cursor|null
|
51 |
-
*/
|
52 |
-
public function previousCursor();
|
53 |
-
/**
|
54 |
-
* Get the "cursor" of the next set of items.
|
55 |
-
*
|
56 |
-
* @return \Illuminate\Pagination\Cursor|null
|
57 |
-
*/
|
58 |
-
public function nextCursor();
|
59 |
-
/**
|
60 |
-
* Determine how many items are being shown per page.
|
61 |
-
*
|
62 |
-
* @return int
|
63 |
-
*/
|
64 |
-
public function perPage();
|
65 |
-
/**
|
66 |
-
* Get the current cursor being paginated.
|
67 |
-
*
|
68 |
-
* @return \Illuminate\Pagination\Cursor|null
|
69 |
-
*/
|
70 |
-
public function cursor();
|
71 |
-
/**
|
72 |
-
* Determine if there are enough items to split into multiple pages.
|
73 |
-
*
|
74 |
-
* @return bool
|
75 |
-
*/
|
76 |
-
public function hasPages();
|
77 |
-
/**
|
78 |
-
* Get the base path for paginator generated URLs.
|
79 |
-
*
|
80 |
-
* @return string|null
|
81 |
-
*/
|
82 |
-
public function path();
|
83 |
-
/**
|
84 |
-
* Determine if the list of items is empty or not.
|
85 |
-
*
|
86 |
-
* @return bool
|
87 |
-
*/
|
88 |
-
public function isEmpty();
|
89 |
-
/**
|
90 |
-
* Determine if the list of items is not empty.
|
91 |
-
*
|
92 |
-
* @return bool
|
93 |
-
*/
|
94 |
-
public function isNotEmpty();
|
95 |
-
/**
|
96 |
-
* Render the paginator using a given view.
|
97 |
-
*
|
98 |
-
* @param string|null $view
|
99 |
-
* @param array $data
|
100 |
-
* @return string
|
101 |
-
*/
|
102 |
-
public function render($view = null, $data = []);
|
103 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Pagination/LengthAwarePaginator.php
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Pagination;
|
4 |
-
|
5 |
-
interface LengthAwarePaginator extends Paginator
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Create a range of pagination URLs.
|
9 |
-
*
|
10 |
-
* @param int $start
|
11 |
-
* @param int $end
|
12 |
-
* @return array
|
13 |
-
*/
|
14 |
-
public function getUrlRange($start, $end);
|
15 |
-
/**
|
16 |
-
* Determine the total number of items in the data store.
|
17 |
-
*
|
18 |
-
* @return int
|
19 |
-
*/
|
20 |
-
public function total();
|
21 |
-
/**
|
22 |
-
* Get the page number of the last available page.
|
23 |
-
*
|
24 |
-
* @return int
|
25 |
-
*/
|
26 |
-
public function lastPage();
|
27 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Pagination/Paginator.php
DELETED
@@ -1,109 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Pagination;
|
4 |
-
|
5 |
-
interface Paginator
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the URL for a given page.
|
9 |
-
*
|
10 |
-
* @param int $page
|
11 |
-
* @return string
|
12 |
-
*/
|
13 |
-
public function url($page);
|
14 |
-
/**
|
15 |
-
* Add a set of query string values to the paginator.
|
16 |
-
*
|
17 |
-
* @param array|string $key
|
18 |
-
* @param string|null $value
|
19 |
-
* @return $this
|
20 |
-
*/
|
21 |
-
public function appends($key, $value = null);
|
22 |
-
/**
|
23 |
-
* Get / set the URL fragment to be appended to URLs.
|
24 |
-
*
|
25 |
-
* @param string|null $fragment
|
26 |
-
* @return $this|string
|
27 |
-
*/
|
28 |
-
public function fragment($fragment = null);
|
29 |
-
/**
|
30 |
-
* The URL for the next page, or null.
|
31 |
-
*
|
32 |
-
* @return string|null
|
33 |
-
*/
|
34 |
-
public function nextPageUrl();
|
35 |
-
/**
|
36 |
-
* Get the URL for the previous page, or null.
|
37 |
-
*
|
38 |
-
* @return string|null
|
39 |
-
*/
|
40 |
-
public function previousPageUrl();
|
41 |
-
/**
|
42 |
-
* Get all of the items being paginated.
|
43 |
-
*
|
44 |
-
* @return array
|
45 |
-
*/
|
46 |
-
public function items();
|
47 |
-
/**
|
48 |
-
* Get the "index" of the first item being paginated.
|
49 |
-
*
|
50 |
-
* @return int
|
51 |
-
*/
|
52 |
-
public function firstItem();
|
53 |
-
/**
|
54 |
-
* Get the "index" of the last item being paginated.
|
55 |
-
*
|
56 |
-
* @return int
|
57 |
-
*/
|
58 |
-
public function lastItem();
|
59 |
-
/**
|
60 |
-
* Determine how many items are being shown per page.
|
61 |
-
*
|
62 |
-
* @return int
|
63 |
-
*/
|
64 |
-
public function perPage();
|
65 |
-
/**
|
66 |
-
* Determine the current page being paginated.
|
67 |
-
*
|
68 |
-
* @return int
|
69 |
-
*/
|
70 |
-
public function currentPage();
|
71 |
-
/**
|
72 |
-
* Determine if there are enough items to split into multiple pages.
|
73 |
-
*
|
74 |
-
* @return bool
|
75 |
-
*/
|
76 |
-
public function hasPages();
|
77 |
-
/**
|
78 |
-
* Determine if there are more items in the data store.
|
79 |
-
*
|
80 |
-
* @return bool
|
81 |
-
*/
|
82 |
-
public function hasMorePages();
|
83 |
-
/**
|
84 |
-
* Get the base path for paginator generated URLs.
|
85 |
-
*
|
86 |
-
* @return string|null
|
87 |
-
*/
|
88 |
-
public function path();
|
89 |
-
/**
|
90 |
-
* Determine if the list of items is empty or not.
|
91 |
-
*
|
92 |
-
* @return bool
|
93 |
-
*/
|
94 |
-
public function isEmpty();
|
95 |
-
/**
|
96 |
-
* Determine if the list of items is not empty.
|
97 |
-
*
|
98 |
-
* @return bool
|
99 |
-
*/
|
100 |
-
public function isNotEmpty();
|
101 |
-
/**
|
102 |
-
* Render the paginator using a given view.
|
103 |
-
*
|
104 |
-
* @param string|null $view
|
105 |
-
* @param array $data
|
106 |
-
* @return string
|
107 |
-
*/
|
108 |
-
public function render($view = null, $data = []);
|
109 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Pipeline/Hub.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Pipeline;
|
4 |
-
|
5 |
-
interface Hub
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Send an object through one of the available pipelines.
|
9 |
-
*
|
10 |
-
* @param mixed $object
|
11 |
-
* @param string|null $pipeline
|
12 |
-
* @return mixed
|
13 |
-
*/
|
14 |
-
public function pipe($object, $pipeline = null);
|
15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Pipeline/Pipeline.php
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Pipeline;
|
4 |
-
|
5 |
-
use Closure;
|
6 |
-
interface Pipeline
|
7 |
-
{
|
8 |
-
/**
|
9 |
-
* Set the traveler object being sent on the pipeline.
|
10 |
-
*
|
11 |
-
* @param mixed $traveler
|
12 |
-
* @return $this
|
13 |
-
*/
|
14 |
-
public function send($traveler);
|
15 |
-
/**
|
16 |
-
* Set the stops of the pipeline.
|
17 |
-
*
|
18 |
-
* @param dynamic|array $stops
|
19 |
-
* @return $this
|
20 |
-
*/
|
21 |
-
public function through($stops);
|
22 |
-
/**
|
23 |
-
* Set the method to call on the stops.
|
24 |
-
*
|
25 |
-
* @param string $method
|
26 |
-
* @return $this
|
27 |
-
*/
|
28 |
-
public function via($method);
|
29 |
-
/**
|
30 |
-
* Run the pipeline with a final destination callback.
|
31 |
-
*
|
32 |
-
* @param \Closure $destination
|
33 |
-
* @return mixed
|
34 |
-
*/
|
35 |
-
public function then(Closure $destination);
|
36 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Queue/ClearableQueue.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Queue;
|
4 |
-
|
5 |
-
interface ClearableQueue
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Delete all of the jobs from the queue.
|
9 |
-
*
|
10 |
-
* @param string $queue
|
11 |
-
* @return int
|
12 |
-
*/
|
13 |
-
public function clear($queue);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Queue/EntityNotFoundException.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Queue;
|
4 |
-
|
5 |
-
use InvalidArgumentException;
|
6 |
-
class EntityNotFoundException extends InvalidArgumentException
|
7 |
-
{
|
8 |
-
/**
|
9 |
-
* Create a new exception instance.
|
10 |
-
*
|
11 |
-
* @param string $type
|
12 |
-
* @param mixed $id
|
13 |
-
* @return void
|
14 |
-
*/
|
15 |
-
public function __construct($type, $id)
|
16 |
-
{
|
17 |
-
$id = (string) $id;
|
18 |
-
parent::__construct("Queueable entity [{$type}] not found for ID [{$id}].");
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Queue/EntityResolver.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Queue;
|
4 |
-
|
5 |
-
interface EntityResolver
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Resolve the entity for the given ID.
|
9 |
-
*
|
10 |
-
* @param string $type
|
11 |
-
* @param mixed $id
|
12 |
-
* @return mixed
|
13 |
-
*/
|
14 |
-
public function resolve($type, $id);
|
15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Queue/Factory.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Queue;
|
4 |
-
|
5 |
-
interface Factory
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Resolve a queue connection instance.
|
9 |
-
*
|
10 |
-
* @param string|null $name
|
11 |
-
* @return \Illuminate\Contracts\Queue\Queue
|
12 |
-
*/
|
13 |
-
public function connection($name = null);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Queue/Job.php
DELETED
@@ -1,145 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Queue;
|
4 |
-
|
5 |
-
interface Job
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the UUID of the job.
|
9 |
-
*
|
10 |
-
* @return string|null
|
11 |
-
*/
|
12 |
-
public function uuid();
|
13 |
-
/**
|
14 |
-
* Get the job identifier.
|
15 |
-
*
|
16 |
-
* @return string
|
17 |
-
*/
|
18 |
-
public function getJobId();
|
19 |
-
/**
|
20 |
-
* Get the decoded body of the job.
|
21 |
-
*
|
22 |
-
* @return array
|
23 |
-
*/
|
24 |
-
public function payload();
|
25 |
-
/**
|
26 |
-
* Fire the job.
|
27 |
-
*
|
28 |
-
* @return void
|
29 |
-
*/
|
30 |
-
public function fire();
|
31 |
-
/**
|
32 |
-
* Release the job back into the queue.
|
33 |
-
*
|
34 |
-
* Accepts a delay specified in seconds.
|
35 |
-
*
|
36 |
-
* @param int $delay
|
37 |
-
* @return void
|
38 |
-
*/
|
39 |
-
public function release($delay = 0);
|
40 |
-
/**
|
41 |
-
* Determine if the job was released back into the queue.
|
42 |
-
*
|
43 |
-
* @return bool
|
44 |
-
*/
|
45 |
-
public function isReleased();
|
46 |
-
/**
|
47 |
-
* Delete the job from the queue.
|
48 |
-
*
|
49 |
-
* @return void
|
50 |
-
*/
|
51 |
-
public function delete();
|
52 |
-
/**
|
53 |
-
* Determine if the job has been deleted.
|
54 |
-
*
|
55 |
-
* @return bool
|
56 |
-
*/
|
57 |
-
public function isDeleted();
|
58 |
-
/**
|
59 |
-
* Determine if the job has been deleted or released.
|
60 |
-
*
|
61 |
-
* @return bool
|
62 |
-
*/
|
63 |
-
public function isDeletedOrReleased();
|
64 |
-
/**
|
65 |
-
* Get the number of times the job has been attempted.
|
66 |
-
*
|
67 |
-
* @return int
|
68 |
-
*/
|
69 |
-
public function attempts();
|
70 |
-
/**
|
71 |
-
* Determine if the job has been marked as a failure.
|
72 |
-
*
|
73 |
-
* @return bool
|
74 |
-
*/
|
75 |
-
public function hasFailed();
|
76 |
-
/**
|
77 |
-
* Mark the job as "failed".
|
78 |
-
*
|
79 |
-
* @return void
|
80 |
-
*/
|
81 |
-
public function markAsFailed();
|
82 |
-
/**
|
83 |
-
* Delete the job, call the "failed" method, and raise the failed job event.
|
84 |
-
*
|
85 |
-
* @param \Throwable|null $e
|
86 |
-
* @return void
|
87 |
-
*/
|
88 |
-
public function fail($e = null);
|
89 |
-
/**
|
90 |
-
* Get the number of times to attempt a job.
|
91 |
-
*
|
92 |
-
* @return int|null
|
93 |
-
*/
|
94 |
-
public function maxTries();
|
95 |
-
/**
|
96 |
-
* Get the maximum number of exceptions allowed, regardless of attempts.
|
97 |
-
*
|
98 |
-
* @return int|null
|
99 |
-
*/
|
100 |
-
public function maxExceptions();
|
101 |
-
/**
|
102 |
-
* Get the number of seconds the job can run.
|
103 |
-
*
|
104 |
-
* @return int|null
|
105 |
-
*/
|
106 |
-
public function timeout();
|
107 |
-
/**
|
108 |
-
* Get the timestamp indicating when the job should timeout.
|
109 |
-
*
|
110 |
-
* @return int|null
|
111 |
-
*/
|
112 |
-
public function retryUntil();
|
113 |
-
/**
|
114 |
-
* Get the name of the queued job class.
|
115 |
-
*
|
116 |
-
* @return string
|
117 |
-
*/
|
118 |
-
public function getName();
|
119 |
-
/**
|
120 |
-
* Get the resolved name of the queued job class.
|
121 |
-
*
|
122 |
-
* Resolves the name of "wrapped" jobs such as class-based handlers.
|
123 |
-
*
|
124 |
-
* @return string
|
125 |
-
*/
|
126 |
-
public function resolveName();
|
127 |
-
/**
|
128 |
-
* Get the name of the connection the job belongs to.
|
129 |
-
*
|
130 |
-
* @return string
|
131 |
-
*/
|
132 |
-
public function getConnectionName();
|
133 |
-
/**
|
134 |
-
* Get the name of the queue the job belongs to.
|
135 |
-
*
|
136 |
-
* @return string
|
137 |
-
*/
|
138 |
-
public function getQueue();
|
139 |
-
/**
|
140 |
-
* Get the raw body string for the job.
|
141 |
-
*
|
142 |
-
* @return string
|
143 |
-
*/
|
144 |
-
public function getRawBody();
|
145 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Queue/Monitor.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Queue;
|
4 |
-
|
5 |
-
interface Monitor
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Register a callback to be executed on every iteration through the queue loop.
|
9 |
-
*
|
10 |
-
* @param mixed $callback
|
11 |
-
* @return void
|
12 |
-
*/
|
13 |
-
public function looping($callback);
|
14 |
-
/**
|
15 |
-
* Register a callback to be executed when a job fails after the maximum amount of retries.
|
16 |
-
*
|
17 |
-
* @param mixed $callback
|
18 |
-
* @return void
|
19 |
-
*/
|
20 |
-
public function failing($callback);
|
21 |
-
/**
|
22 |
-
* Register a callback to be executed when a daemon queue is stopping.
|
23 |
-
*
|
24 |
-
* @param mixed $callback
|
25 |
-
* @return void
|
26 |
-
*/
|
27 |
-
public function stopping($callback);
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Queue/Queue.php
DELETED
@@ -1,90 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Queue;
|
4 |
-
|
5 |
-
interface Queue
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the size of the queue.
|
9 |
-
*
|
10 |
-
* @param string|null $queue
|
11 |
-
* @return int
|
12 |
-
*/
|
13 |
-
public function size($queue = null);
|
14 |
-
/**
|
15 |
-
* Push a new job onto the queue.
|
16 |
-
*
|
17 |
-
* @param string|object $job
|
18 |
-
* @param mixed $data
|
19 |
-
* @param string|null $queue
|
20 |
-
* @return mixed
|
21 |
-
*/
|
22 |
-
public function push($job, $data = '', $queue = null);
|
23 |
-
/**
|
24 |
-
* Push a new job onto the queue.
|
25 |
-
*
|
26 |
-
* @param string $queue
|
27 |
-
* @param string|object $job
|
28 |
-
* @param mixed $data
|
29 |
-
* @return mixed
|
30 |
-
*/
|
31 |
-
public function pushOn($queue, $job, $data = '');
|
32 |
-
/**
|
33 |
-
* Push a raw payload onto the queue.
|
34 |
-
*
|
35 |
-
* @param string $payload
|
36 |
-
* @param string|null $queue
|
37 |
-
* @param array $options
|
38 |
-
* @return mixed
|
39 |
-
*/
|
40 |
-
public function pushRaw($payload, $queue = null, array $options = []);
|
41 |
-
/**
|
42 |
-
* Push a new job onto the queue after a delay.
|
43 |
-
*
|
44 |
-
* @param \DateTimeInterface|\DateInterval|int $delay
|
45 |
-
* @param string|object $job
|
46 |
-
* @param mixed $data
|
47 |
-
* @param string|null $queue
|
48 |
-
* @return mixed
|
49 |
-
*/
|
50 |
-
public function later($delay, $job, $data = '', $queue = null);
|
51 |
-
/**
|
52 |
-
* Push a new job onto the queue after a delay.
|
53 |
-
*
|
54 |
-
* @param string $queue
|
55 |
-
* @param \DateTimeInterface|\DateInterval|int $delay
|
56 |
-
* @param string|object $job
|
57 |
-
* @param mixed $data
|
58 |
-
* @return mixed
|
59 |
-
*/
|
60 |
-
public function laterOn($queue, $delay, $job, $data = '');
|
61 |
-
/**
|
62 |
-
* Push an array of jobs onto the queue.
|
63 |
-
*
|
64 |
-
* @param array $jobs
|
65 |
-
* @param mixed $data
|
66 |
-
* @param string|null $queue
|
67 |
-
* @return mixed
|
68 |
-
*/
|
69 |
-
public function bulk($jobs, $data = '', $queue = null);
|
70 |
-
/**
|
71 |
-
* Pop the next job off of the queue.
|
72 |
-
*
|
73 |
-
* @param string|null $queue
|
74 |
-
* @return \Illuminate\Contracts\Queue\Job|null
|
75 |
-
*/
|
76 |
-
public function pop($queue = null);
|
77 |
-
/**
|
78 |
-
* Get the connection name for the queue.
|
79 |
-
*
|
80 |
-
* @return string
|
81 |
-
*/
|
82 |
-
public function getConnectionName();
|
83 |
-
/**
|
84 |
-
* Set the connection name for the queue.
|
85 |
-
*
|
86 |
-
* @param string $name
|
87 |
-
* @return $this
|
88 |
-
*/
|
89 |
-
public function setConnectionName($name);
|
90 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Queue/QueueableCollection.php
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Queue;
|
4 |
-
|
5 |
-
interface QueueableCollection
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the type of the entities being queued.
|
9 |
-
*
|
10 |
-
* @return string|null
|
11 |
-
*/
|
12 |
-
public function getQueueableClass();
|
13 |
-
/**
|
14 |
-
* Get the identifiers for all of the entities.
|
15 |
-
*
|
16 |
-
* @return array
|
17 |
-
*/
|
18 |
-
public function getQueueableIds();
|
19 |
-
/**
|
20 |
-
* Get the relationships of the entities being queued.
|
21 |
-
*
|
22 |
-
* @return array
|
23 |
-
*/
|
24 |
-
public function getQueueableRelations();
|
25 |
-
/**
|
26 |
-
* Get the connection of the entities being queued.
|
27 |
-
*
|
28 |
-
* @return string|null
|
29 |
-
*/
|
30 |
-
public function getQueueableConnection();
|
31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Queue/QueueableEntity.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Queue;
|
4 |
-
|
5 |
-
interface QueueableEntity
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the queueable identity for the entity.
|
9 |
-
*
|
10 |
-
* @return mixed
|
11 |
-
*/
|
12 |
-
public function getQueueableId();
|
13 |
-
/**
|
14 |
-
* Get the relationships for the entity.
|
15 |
-
*
|
16 |
-
* @return array
|
17 |
-
*/
|
18 |
-
public function getQueueableRelations();
|
19 |
-
/**
|
20 |
-
* Get the connection of the entity.
|
21 |
-
*
|
22 |
-
* @return string|null
|
23 |
-
*/
|
24 |
-
public function getQueueableConnection();
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Queue/ShouldBeEncrypted.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Queue;
|
4 |
-
|
5 |
-
interface ShouldBeEncrypted
|
6 |
-
{
|
7 |
-
//
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Queue/ShouldBeUnique.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Queue;
|
4 |
-
|
5 |
-
interface ShouldBeUnique
|
6 |
-
{
|
7 |
-
//
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Queue/ShouldBeUniqueUntilProcessing.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Queue;
|
4 |
-
|
5 |
-
interface ShouldBeUniqueUntilProcessing extends ShouldBeUnique
|
6 |
-
{
|
7 |
-
//
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Queue/ShouldQueue.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Queue;
|
4 |
-
|
5 |
-
interface ShouldQueue
|
6 |
-
{
|
7 |
-
//
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Redis/Connection.php
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Redis;
|
4 |
-
|
5 |
-
use Closure;
|
6 |
-
interface Connection
|
7 |
-
{
|
8 |
-
/**
|
9 |
-
* Subscribe to a set of given channels for messages.
|
10 |
-
*
|
11 |
-
* @param array|string $channels
|
12 |
-
* @param \Closure $callback
|
13 |
-
* @return void
|
14 |
-
*/
|
15 |
-
public function subscribe($channels, Closure $callback);
|
16 |
-
/**
|
17 |
-
* Subscribe to a set of given channels with wildcards.
|
18 |
-
*
|
19 |
-
* @param array|string $channels
|
20 |
-
* @param \Closure $callback
|
21 |
-
* @return void
|
22 |
-
*/
|
23 |
-
public function psubscribe($channels, Closure $callback);
|
24 |
-
/**
|
25 |
-
* Run a command against the Redis database.
|
26 |
-
*
|
27 |
-
* @param string $method
|
28 |
-
* @param array $parameters
|
29 |
-
* @return mixed
|
30 |
-
*/
|
31 |
-
public function command($method, array $parameters = []);
|
32 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Redis/Connector.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Redis;
|
4 |
-
|
5 |
-
interface Connector
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Create a connection to a Redis cluster.
|
9 |
-
*
|
10 |
-
* @param array $config
|
11 |
-
* @param array $options
|
12 |
-
* @return \Illuminate\Redis\Connections\Connection
|
13 |
-
*/
|
14 |
-
public function connect(array $config, array $options);
|
15 |
-
/**
|
16 |
-
* Create a connection to a Redis instance.
|
17 |
-
*
|
18 |
-
* @param array $config
|
19 |
-
* @param array $clusterOptions
|
20 |
-
* @param array $options
|
21 |
-
* @return \Illuminate\Redis\Connections\Connection
|
22 |
-
*/
|
23 |
-
public function connectToCluster(array $config, array $clusterOptions, array $options);
|
24 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Redis/Factory.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Redis;
|
4 |
-
|
5 |
-
interface Factory
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get a Redis connection by name.
|
9 |
-
*
|
10 |
-
* @param string|null $name
|
11 |
-
* @return \Illuminate\Redis\Connections\Connection
|
12 |
-
*/
|
13 |
-
public function connection($name = null);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Redis/LimiterTimeoutException.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Redis;
|
4 |
-
|
5 |
-
use Exception;
|
6 |
-
class LimiterTimeoutException extends Exception
|
7 |
-
{
|
8 |
-
//
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Routing/BindingRegistrar.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Routing;
|
4 |
-
|
5 |
-
interface BindingRegistrar
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Add a new route parameter binder.
|
9 |
-
*
|
10 |
-
* @param string $key
|
11 |
-
* @param string|callable $binder
|
12 |
-
* @return void
|
13 |
-
*/
|
14 |
-
public function bind($key, $binder);
|
15 |
-
/**
|
16 |
-
* Get the binding callback for a given binding.
|
17 |
-
*
|
18 |
-
* @param string $key
|
19 |
-
* @return \Closure
|
20 |
-
*/
|
21 |
-
public function getBindingCallback($key);
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Routing/Registrar.php
DELETED
@@ -1,95 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Routing;
|
4 |
-
|
5 |
-
interface Registrar
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Register a new GET route with the router.
|
9 |
-
*
|
10 |
-
* @param string $uri
|
11 |
-
* @param array|string|callable $action
|
12 |
-
* @return \Illuminate\Routing\Route
|
13 |
-
*/
|
14 |
-
public function get($uri, $action);
|
15 |
-
/**
|
16 |
-
* Register a new POST route with the router.
|
17 |
-
*
|
18 |
-
* @param string $uri
|
19 |
-
* @param array|string|callable $action
|
20 |
-
* @return \Illuminate\Routing\Route
|
21 |
-
*/
|
22 |
-
public function post($uri, $action);
|
23 |
-
/**
|
24 |
-
* Register a new PUT route with the router.
|
25 |
-
*
|
26 |
-
* @param string $uri
|
27 |
-
* @param array|string|callable $action
|
28 |
-
* @return \Illuminate\Routing\Route
|
29 |
-
*/
|
30 |
-
public function put($uri, $action);
|
31 |
-
/**
|
32 |
-
* Register a new DELETE route with the router.
|
33 |
-
*
|
34 |
-
* @param string $uri
|
35 |
-
* @param array|string|callable $action
|
36 |
-
* @return \Illuminate\Routing\Route
|
37 |
-
*/
|
38 |
-
public function delete($uri, $action);
|
39 |
-
/**
|
40 |
-
* Register a new PATCH route with the router.
|
41 |
-
*
|
42 |
-
* @param string $uri
|
43 |
-
* @param array|string|callable $action
|
44 |
-
* @return \Illuminate\Routing\Route
|
45 |
-
*/
|
46 |
-
public function patch($uri, $action);
|
47 |
-
/**
|
48 |
-
* Register a new OPTIONS route with the router.
|
49 |
-
*
|
50 |
-
* @param string $uri
|
51 |
-
* @param array|string|callable $action
|
52 |
-
* @return \Illuminate\Routing\Route
|
53 |
-
*/
|
54 |
-
public function options($uri, $action);
|
55 |
-
/**
|
56 |
-
* Register a new route with the given verbs.
|
57 |
-
*
|
58 |
-
* @param array|string $methods
|
59 |
-
* @param string $uri
|
60 |
-
* @param array|string|callable $action
|
61 |
-
* @return \Illuminate\Routing\Route
|
62 |
-
*/
|
63 |
-
public function match($methods, $uri, $action);
|
64 |
-
/**
|
65 |
-
* Route a resource to a controller.
|
66 |
-
*
|
67 |
-
* @param string $name
|
68 |
-
* @param string $controller
|
69 |
-
* @param array $options
|
70 |
-
* @return \Illuminate\Routing\PendingResourceRegistration
|
71 |
-
*/
|
72 |
-
public function resource($name, $controller, array $options = []);
|
73 |
-
/**
|
74 |
-
* Create a route group with shared attributes.
|
75 |
-
*
|
76 |
-
* @param array $attributes
|
77 |
-
* @param \Closure|string $routes
|
78 |
-
* @return void
|
79 |
-
*/
|
80 |
-
public function group(array $attributes, $routes);
|
81 |
-
/**
|
82 |
-
* Substitute the route bindings onto the route.
|
83 |
-
*
|
84 |
-
* @param \Illuminate\Routing\Route $route
|
85 |
-
* @return \Illuminate\Routing\Route
|
86 |
-
*/
|
87 |
-
public function substituteBindings($route);
|
88 |
-
/**
|
89 |
-
* Substitute the implicit Eloquent model bindings for the route.
|
90 |
-
*
|
91 |
-
* @param \Illuminate\Routing\Route $route
|
92 |
-
* @return void
|
93 |
-
*/
|
94 |
-
public function substituteImplicitBindings($route);
|
95 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Routing/ResponseFactory.php
DELETED
@@ -1,142 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Routing;
|
4 |
-
|
5 |
-
interface ResponseFactory
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Create a new response instance.
|
9 |
-
*
|
10 |
-
* @param array|string $content
|
11 |
-
* @param int $status
|
12 |
-
* @param array $headers
|
13 |
-
* @return \Illuminate\Http\Response
|
14 |
-
*/
|
15 |
-
public function make($content = '', $status = 200, array $headers = []);
|
16 |
-
/**
|
17 |
-
* Create a new "no content" response.
|
18 |
-
*
|
19 |
-
* @param int $status
|
20 |
-
* @param array $headers
|
21 |
-
* @return \Illuminate\Http\Response
|
22 |
-
*/
|
23 |
-
public function noContent($status = 204, array $headers = []);
|
24 |
-
/**
|
25 |
-
* Create a new response for a given view.
|
26 |
-
*
|
27 |
-
* @param string|array $view
|
28 |
-
* @param array $data
|
29 |
-
* @param int $status
|
30 |
-
* @param array $headers
|
31 |
-
* @return \Illuminate\Http\Response
|
32 |
-
*/
|
33 |
-
public function view($view, $data = [], $status = 200, array $headers = []);
|
34 |
-
/**
|
35 |
-
* Create a new JSON response instance.
|
36 |
-
*
|
37 |
-
* @param mixed $data
|
38 |
-
* @param int $status
|
39 |
-
* @param array $headers
|
40 |
-
* @param int $options
|
41 |
-
* @return \Illuminate\Http\JsonResponse
|
42 |
-
*/
|
43 |
-
public function json($data = [], $status = 200, array $headers = [], $options = 0);
|
44 |
-
/**
|
45 |
-
* Create a new JSONP response instance.
|
46 |
-
*
|
47 |
-
* @param string $callback
|
48 |
-
* @param mixed $data
|
49 |
-
* @param int $status
|
50 |
-
* @param array $headers
|
51 |
-
* @param int $options
|
52 |
-
* @return \Illuminate\Http\JsonResponse
|
53 |
-
*/
|
54 |
-
public function jsonp($callback, $data = [], $status = 200, array $headers = [], $options = 0);
|
55 |
-
/**
|
56 |
-
* Create a new streamed response instance.
|
57 |
-
*
|
58 |
-
* @param \Closure $callback
|
59 |
-
* @param int $status
|
60 |
-
* @param array $headers
|
61 |
-
* @return \Symfony\Component\HttpFoundation\StreamedResponse
|
62 |
-
*/
|
63 |
-
public function stream($callback, $status = 200, array $headers = []);
|
64 |
-
/**
|
65 |
-
* Create a new streamed response instance as a file download.
|
66 |
-
*
|
67 |
-
* @param \Closure $callback
|
68 |
-
* @param string|null $name
|
69 |
-
* @param array $headers
|
70 |
-
* @param string|null $disposition
|
71 |
-
* @return \Symfony\Component\HttpFoundation\StreamedResponse
|
72 |
-
*/
|
73 |
-
public function streamDownload($callback, $name = null, array $headers = [], $disposition = 'attachment');
|
74 |
-
/**
|
75 |
-
* Create a new file download response.
|
76 |
-
*
|
77 |
-
* @param \SplFileInfo|string $file
|
78 |
-
* @param string|null $name
|
79 |
-
* @param array $headers
|
80 |
-
* @param string|null $disposition
|
81 |
-
* @return \Symfony\Component\HttpFoundation\BinaryFileResponse
|
82 |
-
*/
|
83 |
-
public function download($file, $name = null, array $headers = [], $disposition = 'attachment');
|
84 |
-
/**
|
85 |
-
* Return the raw contents of a binary file.
|
86 |
-
*
|
87 |
-
* @param \SplFileInfo|string $file
|
88 |
-
* @param array $headers
|
89 |
-
* @return \Symfony\Component\HttpFoundation\BinaryFileResponse
|
90 |
-
*/
|
91 |
-
public function file($file, array $headers = []);
|
92 |
-
/**
|
93 |
-
* Create a new redirect response to the given path.
|
94 |
-
*
|
95 |
-
* @param string $path
|
96 |
-
* @param int $status
|
97 |
-
* @param array $headers
|
98 |
-
* @param bool|null $secure
|
99 |
-
* @return \Illuminate\Http\RedirectResponse
|
100 |
-
*/
|
101 |
-
public function redirectTo($path, $status = 302, $headers = [], $secure = null);
|
102 |
-
/**
|
103 |
-
* Create a new redirect response to a named route.
|
104 |
-
*
|
105 |
-
* @param string $route
|
106 |
-
* @param mixed $parameters
|
107 |
-
* @param int $status
|
108 |
-
* @param array $headers
|
109 |
-
* @return \Illuminate\Http\RedirectResponse
|
110 |
-
*/
|
111 |
-
public function redirectToRoute($route, $parameters = [], $status = 302, $headers = []);
|
112 |
-
/**
|
113 |
-
* Create a new redirect response to a controller action.
|
114 |
-
*
|
115 |
-
* @param string $action
|
116 |
-
* @param mixed $parameters
|
117 |
-
* @param int $status
|
118 |
-
* @param array $headers
|
119 |
-
* @return \Illuminate\Http\RedirectResponse
|
120 |
-
*/
|
121 |
-
public function redirectToAction($action, $parameters = [], $status = 302, $headers = []);
|
122 |
-
/**
|
123 |
-
* Create a new redirect response, while putting the current URL in the session.
|
124 |
-
*
|
125 |
-
* @param string $path
|
126 |
-
* @param int $status
|
127 |
-
* @param array $headers
|
128 |
-
* @param bool|null $secure
|
129 |
-
* @return \Illuminate\Http\RedirectResponse
|
130 |
-
*/
|
131 |
-
public function redirectGuest($path, $status = 302, $headers = [], $secure = null);
|
132 |
-
/**
|
133 |
-
* Create a new redirect response to the previously intended location.
|
134 |
-
*
|
135 |
-
* @param string $default
|
136 |
-
* @param int $status
|
137 |
-
* @param array $headers
|
138 |
-
* @param bool|null $secure
|
139 |
-
* @return \Illuminate\Http\RedirectResponse
|
140 |
-
*/
|
141 |
-
public function redirectToIntended($default = '/', $status = 302, $headers = [], $secure = null);
|
142 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Routing/UrlGenerator.php
DELETED
@@ -1,72 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Routing;
|
4 |
-
|
5 |
-
interface UrlGenerator
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the current URL for the request.
|
9 |
-
*
|
10 |
-
* @return string
|
11 |
-
*/
|
12 |
-
public function current();
|
13 |
-
/**
|
14 |
-
* Get the URL for the previous request.
|
15 |
-
*
|
16 |
-
* @param mixed $fallback
|
17 |
-
* @return string
|
18 |
-
*/
|
19 |
-
public function previous($fallback = \false);
|
20 |
-
/**
|
21 |
-
* Generate an absolute URL to the given path.
|
22 |
-
*
|
23 |
-
* @param string $path
|
24 |
-
* @param mixed $extra
|
25 |
-
* @param bool|null $secure
|
26 |
-
* @return string
|
27 |
-
*/
|
28 |
-
public function to($path, $extra = [], $secure = null);
|
29 |
-
/**
|
30 |
-
* Generate a secure, absolute URL to the given path.
|
31 |
-
*
|
32 |
-
* @param string $path
|
33 |
-
* @param array $parameters
|
34 |
-
* @return string
|
35 |
-
*/
|
36 |
-
public function secure($path, $parameters = []);
|
37 |
-
/**
|
38 |
-
* Generate the URL to an application asset.
|
39 |
-
*
|
40 |
-
* @param string $path
|
41 |
-
* @param bool|null $secure
|
42 |
-
* @return string
|
43 |
-
*/
|
44 |
-
public function asset($path, $secure = null);
|
45 |
-
/**
|
46 |
-
* Get the URL to a named route.
|
47 |
-
*
|
48 |
-
* @param string $name
|
49 |
-
* @param mixed $parameters
|
50 |
-
* @param bool $absolute
|
51 |
-
* @return string
|
52 |
-
*
|
53 |
-
* @throws \InvalidArgumentException
|
54 |
-
*/
|
55 |
-
public function route($name, $parameters = [], $absolute = \true);
|
56 |
-
/**
|
57 |
-
* Get the URL to a controller action.
|
58 |
-
*
|
59 |
-
* @param string|array $action
|
60 |
-
* @param mixed $parameters
|
61 |
-
* @param bool $absolute
|
62 |
-
* @return string
|
63 |
-
*/
|
64 |
-
public function action($action, $parameters = [], $absolute = \true);
|
65 |
-
/**
|
66 |
-
* Set the root controller namespace.
|
67 |
-
*
|
68 |
-
* @param string $rootNamespace
|
69 |
-
* @return $this
|
70 |
-
*/
|
71 |
-
public function setRootControllerNamespace($rootNamespace);
|
72 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Routing/UrlRoutable.php
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Routing;
|
4 |
-
|
5 |
-
interface UrlRoutable
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the value of the model's route key.
|
9 |
-
*
|
10 |
-
* @return mixed
|
11 |
-
*/
|
12 |
-
public function getRouteKey();
|
13 |
-
/**
|
14 |
-
* Get the route key for the model.
|
15 |
-
*
|
16 |
-
* @return string
|
17 |
-
*/
|
18 |
-
public function getRouteKeyName();
|
19 |
-
/**
|
20 |
-
* Retrieve the model for a bound value.
|
21 |
-
*
|
22 |
-
* @param mixed $value
|
23 |
-
* @param string|null $field
|
24 |
-
* @return \Illuminate\Database\Eloquent\Model|null
|
25 |
-
*/
|
26 |
-
public function resolveRouteBinding($value, $field = null);
|
27 |
-
/**
|
28 |
-
* Retrieve the child model for a bound value.
|
29 |
-
*
|
30 |
-
* @param string $childType
|
31 |
-
* @param mixed $value
|
32 |
-
* @param string|null $field
|
33 |
-
* @return \Illuminate\Database\Eloquent\Model|null
|
34 |
-
*/
|
35 |
-
public function resolveChildRouteBinding($childType, $value, $field);
|
36 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Session/Session.php
DELETED
@@ -1,179 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Session;
|
4 |
-
|
5 |
-
interface Session
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the name of the session.
|
9 |
-
*
|
10 |
-
* @return string
|
11 |
-
*/
|
12 |
-
public function getName();
|
13 |
-
/**
|
14 |
-
* Set the name of the session.
|
15 |
-
*
|
16 |
-
* @param string $name
|
17 |
-
* @return void
|
18 |
-
*/
|
19 |
-
public function setName($name);
|
20 |
-
/**
|
21 |
-
* Get the current session ID.
|
22 |
-
*
|
23 |
-
* @return string
|
24 |
-
*/
|
25 |
-
public function getId();
|
26 |
-
/**
|
27 |
-
* Set the session ID.
|
28 |
-
*
|
29 |
-
* @param string $id
|
30 |
-
* @return void
|
31 |
-
*/
|
32 |
-
public function setId($id);
|
33 |
-
/**
|
34 |
-
* Start the session, reading the data from a handler.
|
35 |
-
*
|
36 |
-
* @return bool
|
37 |
-
*/
|
38 |
-
public function start();
|
39 |
-
/**
|
40 |
-
* Save the session data to storage.
|
41 |
-
*
|
42 |
-
* @return void
|
43 |
-
*/
|
44 |
-
public function save();
|
45 |
-
/**
|
46 |
-
* Get all of the session data.
|
47 |
-
*
|
48 |
-
* @return array
|
49 |
-
*/
|
50 |
-
public function all();
|
51 |
-
/**
|
52 |
-
* Checks if a key exists.
|
53 |
-
*
|
54 |
-
* @param string|array $key
|
55 |
-
* @return bool
|
56 |
-
*/
|
57 |
-
public function exists($key);
|
58 |
-
/**
|
59 |
-
* Checks if a key is present and not null.
|
60 |
-
*
|
61 |
-
* @param string|array $key
|
62 |
-
* @return bool
|
63 |
-
*/
|
64 |
-
public function has($key);
|
65 |
-
/**
|
66 |
-
* Get an item from the session.
|
67 |
-
*
|
68 |
-
* @param string $key
|
69 |
-
* @param mixed $default
|
70 |
-
* @return mixed
|
71 |
-
*/
|
72 |
-
public function get($key, $default = null);
|
73 |
-
/**
|
74 |
-
* Get the value of a given key and then forget it.
|
75 |
-
*
|
76 |
-
* @param string $key
|
77 |
-
* @param mixed $default
|
78 |
-
* @return mixed
|
79 |
-
*/
|
80 |
-
public function pull($key, $default = null);
|
81 |
-
/**
|
82 |
-
* Put a key / value pair or array of key / value pairs in the session.
|
83 |
-
*
|
84 |
-
* @param string|array $key
|
85 |
-
* @param mixed $value
|
86 |
-
* @return void
|
87 |
-
*/
|
88 |
-
public function put($key, $value = null);
|
89 |
-
/**
|
90 |
-
* Get the CSRF token value.
|
91 |
-
*
|
92 |
-
* @return string
|
93 |
-
*/
|
94 |
-
public function token();
|
95 |
-
/**
|
96 |
-
* Regenerate the CSRF token value.
|
97 |
-
*
|
98 |
-
* @return void
|
99 |
-
*/
|
100 |
-
public function regenerateToken();
|
101 |
-
/**
|
102 |
-
* Remove an item from the session, returning its value.
|
103 |
-
*
|
104 |
-
* @param string $key
|
105 |
-
* @return mixed
|
106 |
-
*/
|
107 |
-
public function remove($key);
|
108 |
-
/**
|
109 |
-
* Remove one or many items from the session.
|
110 |
-
*
|
111 |
-
* @param string|array $keys
|
112 |
-
* @return void
|
113 |
-
*/
|
114 |
-
public function forget($keys);
|
115 |
-
/**
|
116 |
-
* Remove all of the items from the session.
|
117 |
-
*
|
118 |
-
* @return void
|
119 |
-
*/
|
120 |
-
public function flush();
|
121 |
-
/**
|
122 |
-
* Flush the session data and regenerate the ID.
|
123 |
-
*
|
124 |
-
* @return bool
|
125 |
-
*/
|
126 |
-
public function invalidate();
|
127 |
-
/**
|
128 |
-
* Generate a new session identifier.
|
129 |
-
*
|
130 |
-
* @param bool $destroy
|
131 |
-
* @return bool
|
132 |
-
*/
|
133 |
-
public function regenerate($destroy = \false);
|
134 |
-
/**
|
135 |
-
* Generate a new session ID for the session.
|
136 |
-
*
|
137 |
-
* @param bool $destroy
|
138 |
-
* @return bool
|
139 |
-
*/
|
140 |
-
public function migrate($destroy = \false);
|
141 |
-
/**
|
142 |
-
* Determine if the session has been started.
|
143 |
-
*
|
144 |
-
* @return bool
|
145 |
-
*/
|
146 |
-
public function isStarted();
|
147 |
-
/**
|
148 |
-
* Get the previous URL from the session.
|
149 |
-
*
|
150 |
-
* @return string|null
|
151 |
-
*/
|
152 |
-
public function previousUrl();
|
153 |
-
/**
|
154 |
-
* Set the "previous" URL in the session.
|
155 |
-
*
|
156 |
-
* @param string $url
|
157 |
-
* @return void
|
158 |
-
*/
|
159 |
-
public function setPreviousUrl($url);
|
160 |
-
/**
|
161 |
-
* Get the session handler instance.
|
162 |
-
*
|
163 |
-
* @return \SessionHandlerInterface
|
164 |
-
*/
|
165 |
-
public function getHandler();
|
166 |
-
/**
|
167 |
-
* Determine if the session handler needs a request.
|
168 |
-
*
|
169 |
-
* @return bool
|
170 |
-
*/
|
171 |
-
public function handlerNeedsRequest();
|
172 |
-
/**
|
173 |
-
* Set the request on the handler instance.
|
174 |
-
*
|
175 |
-
* @param \Illuminate\Http\Request $request
|
176 |
-
* @return void
|
177 |
-
*/
|
178 |
-
public function setRequestOnHandler($request);
|
179 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Support/Arrayable.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Support;
|
4 |
-
|
5 |
-
interface Arrayable
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the instance as an array.
|
9 |
-
*
|
10 |
-
* @return array
|
11 |
-
*/
|
12 |
-
public function toArray();
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Support/CanBeEscapedWhenCastToString.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Support;
|
4 |
-
|
5 |
-
interface CanBeEscapedWhenCastToString
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Indicate that the object's string representation should be escaped when __toString is invoked.
|
9 |
-
*
|
10 |
-
* @param bool $escape
|
11 |
-
* @return $this
|
12 |
-
*/
|
13 |
-
public function escapeWhenCastingToString($escape = \true);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Support/DeferrableProvider.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Support;
|
4 |
-
|
5 |
-
interface DeferrableProvider
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the services provided by the provider.
|
9 |
-
*
|
10 |
-
* @return array
|
11 |
-
*/
|
12 |
-
public function provides();
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Support/DeferringDisplayableValue.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Support;
|
4 |
-
|
5 |
-
interface DeferringDisplayableValue
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Resolve the displayable value that the class is deferring.
|
9 |
-
*
|
10 |
-
* @return \Illuminate\Contracts\Support\Htmlable|string
|
11 |
-
*/
|
12 |
-
public function resolveDisplayableValue();
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Support/Htmlable.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Support;
|
4 |
-
|
5 |
-
interface Htmlable
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get content as a string of HTML.
|
9 |
-
*
|
10 |
-
* @return string
|
11 |
-
*/
|
12 |
-
public function toHtml();
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Support/Jsonable.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Support;
|
4 |
-
|
5 |
-
interface Jsonable
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Convert the object to its JSON representation.
|
9 |
-
*
|
10 |
-
* @param int $options
|
11 |
-
* @return string
|
12 |
-
*/
|
13 |
-
public function toJson($options = 0);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Support/MessageBag.php
DELETED
@@ -1,90 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Support;
|
4 |
-
|
5 |
-
use Countable;
|
6 |
-
interface MessageBag extends Arrayable, Countable
|
7 |
-
{
|
8 |
-
/**
|
9 |
-
* Get the keys present in the message bag.
|
10 |
-
*
|
11 |
-
* @return array
|
12 |
-
*/
|
13 |
-
public function keys();
|
14 |
-
/**
|
15 |
-
* Add a message to the bag.
|
16 |
-
*
|
17 |
-
* @param string $key
|
18 |
-
* @param string $message
|
19 |
-
* @return $this
|
20 |
-
*/
|
21 |
-
public function add($key, $message);
|
22 |
-
/**
|
23 |
-
* Merge a new array of messages into the bag.
|
24 |
-
*
|
25 |
-
* @param \Illuminate\Contracts\Support\MessageProvider|array $messages
|
26 |
-
* @return $this
|
27 |
-
*/
|
28 |
-
public function merge($messages);
|
29 |
-
/**
|
30 |
-
* Determine if messages exist for a given key.
|
31 |
-
*
|
32 |
-
* @param string|array $key
|
33 |
-
* @return bool
|
34 |
-
*/
|
35 |
-
public function has($key);
|
36 |
-
/**
|
37 |
-
* Get the first message from the bag for a given key.
|
38 |
-
*
|
39 |
-
* @param string|null $key
|
40 |
-
* @param string|null $format
|
41 |
-
* @return string
|
42 |
-
*/
|
43 |
-
public function first($key = null, $format = null);
|
44 |
-
/**
|
45 |
-
* Get all of the messages from the bag for a given key.
|
46 |
-
*
|
47 |
-
* @param string $key
|
48 |
-
* @param string|null $format
|
49 |
-
* @return array
|
50 |
-
*/
|
51 |
-
public function get($key, $format = null);
|
52 |
-
/**
|
53 |
-
* Get all of the messages for every key in the bag.
|
54 |
-
*
|
55 |
-
* @param string|null $format
|
56 |
-
* @return array
|
57 |
-
*/
|
58 |
-
public function all($format = null);
|
59 |
-
/**
|
60 |
-
* Get the raw messages in the container.
|
61 |
-
*
|
62 |
-
* @return array
|
63 |
-
*/
|
64 |
-
public function getMessages();
|
65 |
-
/**
|
66 |
-
* Get the default message format.
|
67 |
-
*
|
68 |
-
* @return string
|
69 |
-
*/
|
70 |
-
public function getFormat();
|
71 |
-
/**
|
72 |
-
* Set the default message format.
|
73 |
-
*
|
74 |
-
* @param string $format
|
75 |
-
* @return $this
|
76 |
-
*/
|
77 |
-
public function setFormat($format = ':message');
|
78 |
-
/**
|
79 |
-
* Determine if the message bag has any messages.
|
80 |
-
*
|
81 |
-
* @return bool
|
82 |
-
*/
|
83 |
-
public function isEmpty();
|
84 |
-
/**
|
85 |
-
* Determine if the message bag has any messages.
|
86 |
-
*
|
87 |
-
* @return bool
|
88 |
-
*/
|
89 |
-
public function isNotEmpty();
|
90 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Support/MessageProvider.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Support;
|
4 |
-
|
5 |
-
interface MessageProvider
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the messages for the instance.
|
9 |
-
*
|
10 |
-
* @return \Illuminate\Contracts\Support\MessageBag
|
11 |
-
*/
|
12 |
-
public function getMessageBag();
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Support/Renderable.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Support;
|
4 |
-
|
5 |
-
interface Renderable
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the evaluated contents of the object.
|
9 |
-
*
|
10 |
-
* @return string
|
11 |
-
*/
|
12 |
-
public function render();
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Support/Responsable.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Support;
|
4 |
-
|
5 |
-
interface Responsable
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Create an HTTP response that represents the object.
|
9 |
-
*
|
10 |
-
* @param \Illuminate\Http\Request $request
|
11 |
-
* @return \Symfony\Component\HttpFoundation\Response
|
12 |
-
*/
|
13 |
-
public function toResponse($request);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Support/ValidatedData.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Support;
|
4 |
-
|
5 |
-
use ArrayAccess;
|
6 |
-
use IteratorAggregate;
|
7 |
-
interface ValidatedData extends Arrayable, ArrayAccess, IteratorAggregate
|
8 |
-
{
|
9 |
-
//
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Translation/HasLocalePreference.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Translation;
|
4 |
-
|
5 |
-
interface HasLocalePreference
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the preferred locale of the entity.
|
9 |
-
*
|
10 |
-
* @return string|null
|
11 |
-
*/
|
12 |
-
public function preferredLocale();
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Translation/Loader.php
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Translation;
|
4 |
-
|
5 |
-
interface Loader
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Load the messages for the given locale.
|
9 |
-
*
|
10 |
-
* @param string $locale
|
11 |
-
* @param string $group
|
12 |
-
* @param string|null $namespace
|
13 |
-
* @return array
|
14 |
-
*/
|
15 |
-
public function load($locale, $group, $namespace = null);
|
16 |
-
/**
|
17 |
-
* Add a new namespace to the loader.
|
18 |
-
*
|
19 |
-
* @param string $namespace
|
20 |
-
* @param string $hint
|
21 |
-
* @return void
|
22 |
-
*/
|
23 |
-
public function addNamespace($namespace, $hint);
|
24 |
-
/**
|
25 |
-
* Add a new JSON path to the loader.
|
26 |
-
*
|
27 |
-
* @param string $path
|
28 |
-
* @return void
|
29 |
-
*/
|
30 |
-
public function addJsonPath($path);
|
31 |
-
/**
|
32 |
-
* Get an array of all the registered namespaces.
|
33 |
-
*
|
34 |
-
* @return array
|
35 |
-
*/
|
36 |
-
public function namespaces();
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Translation/Translator.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Translation;
|
4 |
-
|
5 |
-
interface Translator
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the translation for a given key.
|
9 |
-
*
|
10 |
-
* @param string $key
|
11 |
-
* @param array $replace
|
12 |
-
* @param string|null $locale
|
13 |
-
* @return mixed
|
14 |
-
*/
|
15 |
-
public function get($key, array $replace = [], $locale = null);
|
16 |
-
/**
|
17 |
-
* Get a translation according to an integer value.
|
18 |
-
*
|
19 |
-
* @param string $key
|
20 |
-
* @param \Countable|int|array $number
|
21 |
-
* @param array $replace
|
22 |
-
* @param string|null $locale
|
23 |
-
* @return string
|
24 |
-
*/
|
25 |
-
public function choice($key, $number, array $replace = [], $locale = null);
|
26 |
-
/**
|
27 |
-
* Get the default locale being used.
|
28 |
-
*
|
29 |
-
* @return string
|
30 |
-
*/
|
31 |
-
public function getLocale();
|
32 |
-
/**
|
33 |
-
* Set the default locale.
|
34 |
-
*
|
35 |
-
* @param string $locale
|
36 |
-
* @return void
|
37 |
-
*/
|
38 |
-
public function setLocale($locale);
|
39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Validation/DataAwareRule.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Validation;
|
4 |
-
|
5 |
-
interface DataAwareRule
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Set the data under validation.
|
9 |
-
*
|
10 |
-
* @param array $data
|
11 |
-
* @return $this
|
12 |
-
*/
|
13 |
-
public function setData($data);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Validation/Factory.php
DELETED
@@ -1,43 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Validation;
|
4 |
-
|
5 |
-
interface Factory
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Create a new Validator instance.
|
9 |
-
*
|
10 |
-
* @param array $data
|
11 |
-
* @param array $rules
|
12 |
-
* @param array $messages
|
13 |
-
* @param array $customAttributes
|
14 |
-
* @return \Illuminate\Contracts\Validation\Validator
|
15 |
-
*/
|
16 |
-
public function make(array $data, array $rules, array $messages = [], array $customAttributes = []);
|
17 |
-
/**
|
18 |
-
* Register a custom validator extension.
|
19 |
-
*
|
20 |
-
* @param string $rule
|
21 |
-
* @param \Closure|string $extension
|
22 |
-
* @param string|null $message
|
23 |
-
* @return void
|
24 |
-
*/
|
25 |
-
public function extend($rule, $extension, $message = null);
|
26 |
-
/**
|
27 |
-
* Register a custom implicit validator extension.
|
28 |
-
*
|
29 |
-
* @param string $rule
|
30 |
-
* @param \Closure|string $extension
|
31 |
-
* @param string|null $message
|
32 |
-
* @return void
|
33 |
-
*/
|
34 |
-
public function extendImplicit($rule, $extension, $message = null);
|
35 |
-
/**
|
36 |
-
* Register a custom implicit validator message replacer.
|
37 |
-
*
|
38 |
-
* @param string $rule
|
39 |
-
* @param \Closure|string $replacer
|
40 |
-
* @return void
|
41 |
-
*/
|
42 |
-
public function replacer($rule, $replacer);
|
43 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Validation/ImplicitRule.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Validation;
|
4 |
-
|
5 |
-
interface ImplicitRule extends Rule
|
6 |
-
{
|
7 |
-
//
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Validation/Rule.php
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Validation;
|
4 |
-
|
5 |
-
interface Rule
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Determine if the validation rule passes.
|
9 |
-
*
|
10 |
-
* @param string $attribute
|
11 |
-
* @param mixed $value
|
12 |
-
* @return bool
|
13 |
-
*/
|
14 |
-
public function passes($attribute, $value);
|
15 |
-
/**
|
16 |
-
* Get the validation error message.
|
17 |
-
*
|
18 |
-
* @return string|array
|
19 |
-
*/
|
20 |
-
public function message();
|
21 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Validation/UncompromisedVerifier.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Validation;
|
4 |
-
|
5 |
-
interface UncompromisedVerifier
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Verify that the given data has not been compromised in data leaks.
|
9 |
-
*
|
10 |
-
* @param array $data
|
11 |
-
* @return bool
|
12 |
-
*/
|
13 |
-
public function verify($data);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Validation/ValidatesWhenResolved.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Validation;
|
4 |
-
|
5 |
-
interface ValidatesWhenResolved
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Validate the given class instance.
|
9 |
-
*
|
10 |
-
* @return void
|
11 |
-
*/
|
12 |
-
public function validateResolved();
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Validation/Validator.php
DELETED
@@ -1,58 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Validation;
|
4 |
-
|
5 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Support\MessageProvider;
|
6 |
-
interface Validator extends MessageProvider
|
7 |
-
{
|
8 |
-
/**
|
9 |
-
* Run the validator's rules against its data.
|
10 |
-
*
|
11 |
-
* @return array
|
12 |
-
*
|
13 |
-
* @throws \Illuminate\Validation\ValidationException
|
14 |
-
*/
|
15 |
-
public function validate();
|
16 |
-
/**
|
17 |
-
* Get the attributes and values that were validated.
|
18 |
-
*
|
19 |
-
* @return array
|
20 |
-
*
|
21 |
-
* @throws \Illuminate\Validation\ValidationException
|
22 |
-
*/
|
23 |
-
public function validated();
|
24 |
-
/**
|
25 |
-
* Determine if the data fails the validation rules.
|
26 |
-
*
|
27 |
-
* @return bool
|
28 |
-
*/
|
29 |
-
public function fails();
|
30 |
-
/**
|
31 |
-
* Get the failed validation rules.
|
32 |
-
*
|
33 |
-
* @return array
|
34 |
-
*/
|
35 |
-
public function failed();
|
36 |
-
/**
|
37 |
-
* Add conditions to a given field based on a Closure.
|
38 |
-
*
|
39 |
-
* @param string|array $attribute
|
40 |
-
* @param string|array $rules
|
41 |
-
* @param callable $callback
|
42 |
-
* @return $this
|
43 |
-
*/
|
44 |
-
public function sometimes($attribute, $rules, callable $callback);
|
45 |
-
/**
|
46 |
-
* Add an after validation callback.
|
47 |
-
*
|
48 |
-
* @param callable|string $callback
|
49 |
-
* @return $this
|
50 |
-
*/
|
51 |
-
public function after($callback);
|
52 |
-
/**
|
53 |
-
* Get all of the validation error messages.
|
54 |
-
*
|
55 |
-
* @return \Illuminate\Support\MessageBag
|
56 |
-
*/
|
57 |
-
public function errors();
|
58 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/Validation/ValidatorAwareRule.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\Validation;
|
4 |
-
|
5 |
-
interface ValidatorAwareRule
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Set the current validator.
|
9 |
-
*
|
10 |
-
* @param \Illuminate\Validation\Validator $validator
|
11 |
-
* @return $this
|
12 |
-
*/
|
13 |
-
public function setValidator($validator);
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/View/Engine.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\View;
|
4 |
-
|
5 |
-
interface Engine
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Get the evaluated contents of the view.
|
9 |
-
*
|
10 |
-
* @param string $path
|
11 |
-
* @param array $data
|
12 |
-
* @return string
|
13 |
-
*/
|
14 |
-
public function get($path, array $data = []);
|
15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/View/Factory.php
DELETED
@@ -1,72 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\View;
|
4 |
-
|
5 |
-
interface Factory
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Determine if a given view exists.
|
9 |
-
*
|
10 |
-
* @param string $view
|
11 |
-
* @return bool
|
12 |
-
*/
|
13 |
-
public function exists($view);
|
14 |
-
/**
|
15 |
-
* Get the evaluated view contents for the given path.
|
16 |
-
*
|
17 |
-
* @param string $path
|
18 |
-
* @param \Illuminate\Contracts\Support\Arrayable|array $data
|
19 |
-
* @param array $mergeData
|
20 |
-
* @return \Illuminate\Contracts\View\View
|
21 |
-
*/
|
22 |
-
public function file($path, $data = [], $mergeData = []);
|
23 |
-
/**
|
24 |
-
* Get the evaluated view contents for the given view.
|
25 |
-
*
|
26 |
-
* @param string $view
|
27 |
-
* @param \Illuminate\Contracts\Support\Arrayable|array $data
|
28 |
-
* @param array $mergeData
|
29 |
-
* @return \Illuminate\Contracts\View\View
|
30 |
-
*/
|
31 |
-
public function make($view, $data = [], $mergeData = []);
|
32 |
-
/**
|
33 |
-
* Add a piece of shared data to the environment.
|
34 |
-
*
|
35 |
-
* @param array|string $key
|
36 |
-
* @param mixed $value
|
37 |
-
* @return mixed
|
38 |
-
*/
|
39 |
-
public function share($key, $value = null);
|
40 |
-
/**
|
41 |
-
* Register a view composer event.
|
42 |
-
*
|
43 |
-
* @param array|string $views
|
44 |
-
* @param \Closure|string $callback
|
45 |
-
* @return array
|
46 |
-
*/
|
47 |
-
public function composer($views, $callback);
|
48 |
-
/**
|
49 |
-
* Register a view creator event.
|
50 |
-
*
|
51 |
-
* @param array|string $views
|
52 |
-
* @param \Closure|string $callback
|
53 |
-
* @return array
|
54 |
-
*/
|
55 |
-
public function creator($views, $callback);
|
56 |
-
/**
|
57 |
-
* Add a new namespace to the loader.
|
58 |
-
*
|
59 |
-
* @param string $namespace
|
60 |
-
* @param string|array $hints
|
61 |
-
* @return $this
|
62 |
-
*/
|
63 |
-
public function addNamespace($namespace, $hints);
|
64 |
-
/**
|
65 |
-
* Replace the namespace hints for the given namespace.
|
66 |
-
*
|
67 |
-
* @param string $namespace
|
68 |
-
* @param string|array $hints
|
69 |
-
* @return $this
|
70 |
-
*/
|
71 |
-
public function replaceNamespace($namespace, $hints);
|
72 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/contracts/View/View.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Contracts\View;
|
4 |
-
|
5 |
-
use Data443\gdpr\framework\Illuminate\Contracts\Support\Renderable;
|
6 |
-
interface View extends Renderable
|
7 |
-
{
|
8 |
-
/**
|
9 |
-
* Get the name of the view.
|
10 |
-
*
|
11 |
-
* @return string
|
12 |
-
*/
|
13 |
-
public function name();
|
14 |
-
/**
|
15 |
-
* Add a piece of data to the view.
|
16 |
-
*
|
17 |
-
* @param string|array $key
|
18 |
-
* @param mixed $value
|
19 |
-
* @return $this
|
20 |
-
*/
|
21 |
-
public function with($key, $value = null);
|
22 |
-
/**
|
23 |
-
* Get the array of view data.
|
24 |
-
*
|
25 |
-
* @return array
|
26 |
-
*/
|
27 |
-
public function getData();
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/illuminate/macroable/Traits/Macroable.php
DELETED
@@ -1,106 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Illuminate\Support\Traits;
|
4 |
-
|
5 |
-
use BadMethodCallException;
|
6 |
-
use Closure;
|
7 |
-
use ReflectionClass;
|
8 |
-
use ReflectionMethod;
|
9 |
-
trait Macroable
|
10 |
-
{
|
11 |
-
/**
|
12 |
-
* The registered string macros.
|
13 |
-
*
|
14 |
-
* @var array
|
15 |
-
*/
|
16 |
-
protected static $macros = [];
|
17 |
-
/**
|
18 |
-
* Register a custom macro.
|
19 |
-
*
|
20 |
-
* @param string $name
|
21 |
-
* @param object|callable $macro
|
22 |
-
* @return void
|
23 |
-
*/
|
24 |
-
public static function macro($name, $macro)
|
25 |
-
{
|
26 |
-
static::$macros[$name] = $macro;
|
27 |
-
}
|
28 |
-
/**
|
29 |
-
* Mix another object into the class.
|
30 |
-
*
|
31 |
-
* @param object $mixin
|
32 |
-
* @param bool $replace
|
33 |
-
* @return void
|
34 |
-
*
|
35 |
-
* @throws \ReflectionException
|
36 |
-
*/
|
37 |
-
public static function mixin($mixin, $replace = \true)
|
38 |
-
{
|
39 |
-
$methods = (new ReflectionClass($mixin))->getMethods(ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED);
|
40 |
-
foreach ($methods as $method) {
|
41 |
-
if ($replace || !static::hasMacro($method->name)) {
|
42 |
-
$method->setAccessible(\true);
|
43 |
-
static::macro($method->name, $method->invoke($mixin));
|
44 |
-
}
|
45 |
-
}
|
46 |
-
}
|
47 |
-
/**
|
48 |
-
* Checks if macro is registered.
|
49 |
-
*
|
50 |
-
* @param string $name
|
51 |
-
* @return bool
|
52 |
-
*/
|
53 |
-
public static function hasMacro($name)
|
54 |
-
{
|
55 |
-
return isset(static::$macros[$name]);
|
56 |
-
}
|
57 |
-
/**
|
58 |
-
* Flush the existing macros.
|
59 |
-
*
|
60 |
-
* @return void
|
61 |
-
*/
|
62 |
-
public static function flushMacros()
|
63 |
-
{
|
64 |
-
static::$macros = [];
|
65 |
-
}
|
66 |
-
/**
|
67 |
-
* Dynamically handle calls to the class.
|
68 |
-
*
|
69 |
-
* @param string $method
|
70 |
-
* @param array $parameters
|
71 |
-
* @return mixed
|
72 |
-
*
|
73 |
-
* @throws \BadMethodCallException
|
74 |
-
*/
|
75 |
-
public static function __callStatic($method, $parameters)
|
76 |
-
{
|
77 |
-
if (!static::hasMacro($method)) {
|
78 |
-
throw new BadMethodCallException(\sprintf('Method %s::%s does not exist.', static::class, $method));
|
79 |
-
}
|
80 |
-
$macro = static::$macros[$method];
|
81 |
-
if ($macro instanceof Closure) {
|
82 |
-
$macro = $macro->bindTo(null, static::class);
|
83 |
-
}
|
84 |
-
return $macro(...$parameters);
|
85 |
-
}
|
86 |
-
/**
|
87 |
-
* Dynamically handle calls to the class.
|
88 |
-
*
|
89 |
-
* @param string $method
|
90 |
-
* @param array $parameters
|
91 |
-
* @return mixed
|
92 |
-
*
|
93 |
-
* @throws \BadMethodCallException
|
94 |
-
*/
|
95 |
-
public function __call($method, $parameters)
|
96 |
-
{
|
97 |
-
if (!static::hasMacro($method)) {
|
98 |
-
throw new BadMethodCallException(\sprintf('Method %s::%s does not exist.', static::class, $method));
|
99 |
-
}
|
100 |
-
$macro = static::$macros[$method];
|
101 |
-
if ($macro instanceof Closure) {
|
102 |
-
$macro = $macro->bindTo($this, static::class);
|
103 |
-
}
|
104 |
-
return $macro(...$parameters);
|
105 |
-
}
|
106 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/psr/container/src/ContainerExceptionInterface.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Psr\Container;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Base interface representing a generic exception in a container.
|
7 |
-
*/
|
8 |
-
interface ContainerExceptionInterface
|
9 |
-
{
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/psr/container/src/ContainerInterface.php
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
declare (strict_types=1);
|
4 |
-
namespace Data443\gdpr\framework\Psr\Container;
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Describes the interface of a container that exposes methods to read its entries.
|
8 |
-
*/
|
9 |
-
interface ContainerInterface
|
10 |
-
{
|
11 |
-
/**
|
12 |
-
* Finds an entry of the container by its identifier and returns it.
|
13 |
-
*
|
14 |
-
* @param string $id Identifier of the entry to look for.
|
15 |
-
*
|
16 |
-
* @throws NotFoundExceptionInterface No entry was found for **this** identifier.
|
17 |
-
* @throws ContainerExceptionInterface Error while retrieving the entry.
|
18 |
-
*
|
19 |
-
* @return mixed Entry.
|
20 |
-
*/
|
21 |
-
public function get(string $id);
|
22 |
-
/**
|
23 |
-
* Returns true if the container can return an entry for the given identifier.
|
24 |
-
* Returns false otherwise.
|
25 |
-
*
|
26 |
-
* `has($id)` returning true does not mean that `get($id)` will not throw an exception.
|
27 |
-
* It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`.
|
28 |
-
*
|
29 |
-
* @param string $id Identifier of the entry to look for.
|
30 |
-
*
|
31 |
-
* @return bool
|
32 |
-
*/
|
33 |
-
public function has(string $id);
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/psr/container/src/NotFoundExceptionInterface.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Psr\Container;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* No entry was found in the container.
|
7 |
-
*/
|
8 |
-
interface NotFoundExceptionInterface extends ContainerExceptionInterface
|
9 |
-
{
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/psr/simple-cache/src/CacheException.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Psr\SimpleCache;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Interface used for all types of exceptions thrown by the implementing library.
|
7 |
-
*/
|
8 |
-
interface CacheException
|
9 |
-
{
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/psr/simple-cache/src/CacheInterface.php
DELETED
@@ -1,107 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Psr\SimpleCache;
|
4 |
-
|
5 |
-
interface CacheInterface
|
6 |
-
{
|
7 |
-
/**
|
8 |
-
* Fetches a value from the cache.
|
9 |
-
*
|
10 |
-
* @param string $key The unique key of this item in the cache.
|
11 |
-
* @param mixed $default Default value to return if the key does not exist.
|
12 |
-
*
|
13 |
-
* @return mixed The value of the item from the cache, or $default in case of cache miss.
|
14 |
-
*
|
15 |
-
* @throws \Psr\SimpleCache\InvalidArgumentException
|
16 |
-
* MUST be thrown if the $key string is not a legal value.
|
17 |
-
*/
|
18 |
-
public function get($key, $default = null);
|
19 |
-
/**
|
20 |
-
* Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
|
21 |
-
*
|
22 |
-
* @param string $key The key of the item to store.
|
23 |
-
* @param mixed $value The value of the item to store, must be serializable.
|
24 |
-
* @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
|
25 |
-
* the driver supports TTL then the library may set a default value
|
26 |
-
* for it or let the driver take care of that.
|
27 |
-
*
|
28 |
-
* @return bool True on success and false on failure.
|
29 |
-
*
|
30 |
-
* @throws \Psr\SimpleCache\InvalidArgumentException
|
31 |
-
* MUST be thrown if the $key string is not a legal value.
|
32 |
-
*/
|
33 |
-
public function set($key, $value, $ttl = null);
|
34 |
-
/**
|
35 |
-
* Delete an item from the cache by its unique key.
|
36 |
-
*
|
37 |
-
* @param string $key The unique cache key of the item to delete.
|
38 |
-
*
|
39 |
-
* @return bool True if the item was successfully removed. False if there was an error.
|
40 |
-
*
|
41 |
-
* @throws \Psr\SimpleCache\InvalidArgumentException
|
42 |
-
* MUST be thrown if the $key string is not a legal value.
|
43 |
-
*/
|
44 |
-
public function delete($key);
|
45 |
-
/**
|
46 |
-
* Wipes clean the entire cache's keys.
|
47 |
-
*
|
48 |
-
* @return bool True on success and false on failure.
|
49 |
-
*/
|
50 |
-
public function clear();
|
51 |
-
/**
|
52 |
-
* Obtains multiple cache items by their unique keys.
|
53 |
-
*
|
54 |
-
* @param iterable $keys A list of keys that can obtained in a single operation.
|
55 |
-
* @param mixed $default Default value to return for keys that do not exist.
|
56 |
-
*
|
57 |
-
* @return iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
|
58 |
-
*
|
59 |
-
* @throws \Psr\SimpleCache\InvalidArgumentException
|
60 |
-
* MUST be thrown if $keys is neither an array nor a Traversable,
|
61 |
-
* or if any of the $keys are not a legal value.
|
62 |
-
*/
|
63 |
-
public function getMultiple($keys, $default = null);
|
64 |
-
/**
|
65 |
-
* Persists a set of key => value pairs in the cache, with an optional TTL.
|
66 |
-
*
|
67 |
-
* @param iterable $values A list of key => value pairs for a multiple-set operation.
|
68 |
-
* @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
|
69 |
-
* the driver supports TTL then the library may set a default value
|
70 |
-
* for it or let the driver take care of that.
|
71 |
-
*
|
72 |
-
* @return bool True on success and false on failure.
|
73 |
-
*
|
74 |
-
* @throws \Psr\SimpleCache\InvalidArgumentException
|
75 |
-
* MUST be thrown if $values is neither an array nor a Traversable,
|
76 |
-
* or if any of the $values are not a legal value.
|
77 |
-
*/
|
78 |
-
public function setMultiple($values, $ttl = null);
|
79 |
-
/**
|
80 |
-
* Deletes multiple cache items in a single operation.
|
81 |
-
*
|
82 |
-
* @param iterable $keys A list of string-based keys to be deleted.
|
83 |
-
*
|
84 |
-
* @return bool True if the items were successfully removed. False if there was an error.
|
85 |
-
*
|
86 |
-
* @throws \Psr\SimpleCache\InvalidArgumentException
|
87 |
-
* MUST be thrown if $keys is neither an array nor a Traversable,
|
88 |
-
* or if any of the $keys are not a legal value.
|
89 |
-
*/
|
90 |
-
public function deleteMultiple($keys);
|
91 |
-
/**
|
92 |
-
* Determines whether an item is present in the cache.
|
93 |
-
*
|
94 |
-
* NOTE: It is recommended that has() is only to be used for cache warming type purposes
|
95 |
-
* and not to be used within your live applications operations for get/set, as this method
|
96 |
-
* is subject to a race condition where your has() will return true and immediately after,
|
97 |
-
* another script can remove it making the state of your app out of date.
|
98 |
-
*
|
99 |
-
* @param string $key The cache item key.
|
100 |
-
*
|
101 |
-
* @return bool
|
102 |
-
*
|
103 |
-
* @throws \Psr\SimpleCache\InvalidArgumentException
|
104 |
-
* MUST be thrown if the $key string is not a legal value.
|
105 |
-
*/
|
106 |
-
public function has($key);
|
107 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/psr/simple-cache/src/InvalidArgumentException.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Data443\gdpr\framework\Psr\SimpleCache;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Exception interface for invalid cache arguments.
|
7 |
-
*
|
8 |
-
* When an invalid argument is passed it must throw an exception which implements
|
9 |
-
* this interface
|
10 |
-
*/
|
11 |
-
interface InvalidArgumentException extends CacheException
|
12 |
-
{
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
views/admin/notices/header-privacy-safe.php
CHANGED
@@ -1,4 +1,5 @@
|
|
|
|
1 |
<div class="notice notice-gdpr">
|
2 |
-
<img class="gdpr-badge" src="<?= gdpr
|
3 |
<div class="gdpr-content">
|
4 |
<h2><?= esc_html_x('Privacy Safe By Data443', '(Admin)', 'gdpr-framework'); ?></h2>
|
1 |
+
<?php global $gdpr ?>
|
2 |
<div class="notice notice-gdpr">
|
3 |
+
<img class="gdpr-badge" src="<?= $gdpr->PluginUrl; ?>assets/privacy-safe.svg" />
|
4 |
<div class="gdpr-content">
|
5 |
<h2><?= esc_html_x('Privacy Safe By Data443', '(Admin)', 'gdpr-framework'); ?></h2>
|
views/admin/notices/header-step.php
CHANGED
@@ -1,5 +1,6 @@
|
|
|
|
1 |
<div class="notice notice-gdpr">
|
2 |
-
<img class="gdpr-badge" src="<?= gdpr
|
3 |
<div class="gdpr-content">
|
4 |
<form method="POST">
|
5 |
<input type="hidden" name="gdpr-installer" value="next">
|
1 |
+
<?php global $gdpr; ?>
|
2 |
<div class="notice notice-gdpr">
|
3 |
+
<img class="gdpr-badge" src="<?= $gdpr->PluginUrl; ?>assets/gdpr-rhino.svg" />
|
4 |
<div class="gdpr-content">
|
5 |
<form method="POST">
|
6 |
<input type="hidden" name="gdpr-installer" value="next">
|
views/admin/notices/header.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<div class="notice notice-gdpr">
|
2 |
-
|
|
|
3 |
<div class="gdpr-content">
|
4 |
<h2><?= esc_html_x('The GDPR Framework By Data443', '(Admin)', 'gdpr-framework'); ?></h2>
|
1 |
<div class="notice notice-gdpr">
|
2 |
+
<?php global $gdpr; ?>
|
3 |
+
<img class="gdpr-badge" src="<?= $gdpr->PluginUrl; ?>assets/gdpr-framework-logo.svg" />
|
4 |
<div class="gdpr-content">
|
5 |
<h2><?= esc_html_x('The GDPR Framework By Data443', '(Admin)', 'gdpr-framework'); ?></h2>
|
views/admin/support/contents.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<hr>
|
2 |
-
|
3 |
<section class="section">
|
4 |
<h3 class="align-center">
|
5 |
<?= esc_html_x('Need more info?', '(Admin)', 'gdpr-framework'); ?>
|
6 |
</h3>
|
7 |
<div class="row">
|
8 |
<div class="col">
|
9 |
-
<div class="col_image" style="background-image:url('<?= gdpr
|
10 |
<a class="button button-primary" href="<?= gdpr('helpers')->siteOwnersGuide(); ?>" target="_blank">
|
11 |
<?= esc_html_x('Site Owner\'s guide to GDPR', '(Admin)', 'gdpr-framework'); ?>
|
12 |
</a>
|
@@ -15,7 +15,7 @@
|
|
15 |
</p>
|
16 |
</div>
|
17 |
<div class="col">
|
18 |
-
<div class="col_image" style="background-image:url('<?= gdpr
|
19 |
<a class="button button-primary" href="<?= gdpr('helpers')->knowledgeBase(); ?>" target="_blank">
|
20 |
<?= esc_html_x('Knowledge base', '(Admin)', 'gdpr-framework'); ?>
|
21 |
</a>
|
@@ -24,7 +24,7 @@
|
|
24 |
</p>
|
25 |
</div>
|
26 |
<div class="col">
|
27 |
-
<div class="col_image" style="background-image:url('<?= gdpr
|
28 |
<a class="button button-primary" href="<?= gdpr('helpers')->developerDocs(); ?>" target="_blank">
|
29 |
<?= esc_html_x('Developer\'s guide to GDPR', '(Admin)', 'gdpr-framework'); ?>
|
30 |
</a>
|
@@ -41,7 +41,7 @@
|
|
41 |
</h3>
|
42 |
<div class="row">
|
43 |
<div class="col">
|
44 |
-
<div class="col_image" style="background-image:url('<?= gdpr
|
45 |
<a class="button button-primary" href="<?=gdpr('helpers')->supportRequest()?>" target="_blank">
|
46 |
<?= esc_html_x('Submit a support request', '(Admin)', 'gdpr-framework'); ?>
|
47 |
</a>
|
@@ -50,7 +50,7 @@
|
|
50 |
</p>
|
51 |
</div>
|
52 |
<div class="col">
|
53 |
-
<div class="col_image" style="background-image:url('<?= gdpr
|
54 |
<a class="button button-primary" href="<?= gdpr('helpers')->docs('contact/'); ?>" target="_blank">
|
55 |
<?= esc_html_x('Request a consultation', '(Admin)', 'gdpr-framework'); ?>
|
56 |
</a>
|
1 |
<hr>
|
2 |
+
<?php global $gdpr; ?>
|
3 |
<section class="section">
|
4 |
<h3 class="align-center">
|
5 |
<?= esc_html_x('Need more info?', '(Admin)', 'gdpr-framework'); ?>
|
6 |
</h3>
|
7 |
<div class="row">
|
8 |
<div class="col">
|
9 |
+
<div class="col_image" style="background-image:url('<?= $gdpr->PluginUrl; ?>/assets/1.png');"></div>
|
10 |
<a class="button button-primary" href="<?= gdpr('helpers')->siteOwnersGuide(); ?>" target="_blank">
|
11 |
<?= esc_html_x('Site Owner\'s guide to GDPR', '(Admin)', 'gdpr-framework'); ?>
|
12 |
</a>
|
15 |
</p>
|
16 |
</div>
|
17 |
<div class="col">
|
18 |
+
<div class="col_image" style="background-image:url('<?= $gdpr->PluginUrl; ?>/assets/2.png');"></div>
|
19 |
<a class="button button-primary" href="<?= gdpr('helpers')->knowledgeBase(); ?>" target="_blank">
|
20 |
<?= esc_html_x('Knowledge base', '(Admin)', 'gdpr-framework'); ?>
|
21 |
</a>
|
24 |
</p>
|
25 |
</div>
|
26 |
<div class="col">
|
27 |
+
<div class="col_image" style="background-image:url('<?= $gdpr->PluginUrl; ?>/assets/3.png');"></div>
|
28 |
<a class="button button-primary" href="<?= gdpr('helpers')->developerDocs(); ?>" target="_blank">
|
29 |
<?= esc_html_x('Developer\'s guide to GDPR', '(Admin)', 'gdpr-framework'); ?>
|
30 |
</a>
|
41 |
</h3>
|
42 |
<div class="row">
|
43 |
<div class="col">
|
44 |
+
<div class="col_image" style="background-image:url('<?= $gdpr->PluginUrl; ?>/assets/4.png');"></div>
|
45 |
<a class="button button-primary" href="<?=gdpr('helpers')->supportRequest()?>" target="_blank">
|
46 |
<?= esc_html_x('Submit a support request', '(Admin)', 'gdpr-framework'); ?>
|
47 |
</a>
|
50 |
</p>
|
51 |
</div>
|
52 |
<div class="col">
|
53 |
+
<div class="col_image" style="background-image:url('<?= $gdpr->PluginUrl; ?>/assets/5.png');"></div>
|
54 |
<a class="button button-primary" href="<?= gdpr('helpers')->docs('contact/'); ?>" target="_blank">
|
55 |
<?= esc_html_x('Request a consultation', '(Admin)', 'gdpr-framework'); ?>
|
56 |
</a>
|
views/installer/header.php
CHANGED
@@ -11,12 +11,12 @@
|
|
11 |
<?php do_action('admin_head'); ?>
|
12 |
</head>
|
13 |
|
|
|
14 |
<body class="gdpr-installer wp-core-ui">
|
15 |
-
|
16 |
<div class="container gdpr-installer-container">
|
17 |
<div class="gdpr-header">
|
18 |
<div class="gdpr-header_left">
|
19 |
-
<img class="gdpr-logo" src="<?= gdpr
|
20 |
</div>
|
21 |
<div class="gdpr-header_right">
|
22 |
<h1>
|
11 |
<?php do_action('admin_head'); ?>
|
12 |
</head>
|
13 |
|
14 |
+
<?php global $gdpr; ?>
|
15 |
<body class="gdpr-installer wp-core-ui">
|
|
|
16 |
<div class="container gdpr-installer-container">
|
17 |
<div class="gdpr-header">
|
18 |
<div class="gdpr-header_left">
|
19 |
+
<img class="gdpr-logo" src="<?= $gdpr->PluginUrl; ?>/assets/gdpr-framework-logo.svg" />
|
20 |
</div>
|
21 |
<div class="gdpr-header_right">
|
22 |
<h1>
|
views/installer/steps/finish.php
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
<h2 class="align-center">
|
2 |
All done!
|
3 |
</h2>
|
@@ -11,7 +12,7 @@
|
|
11 |
</h3>
|
12 |
<div class="row">
|
13 |
<div class="col">
|
14 |
-
<div class="col_image" style="background-image:url('<?= gdpr
|
15 |
<a class="button button-primary" href="<?= gdpr('helpers')->siteOwnersGuide(); ?>" target="_blank">
|
16 |
<?= esc_html_x('Site Owner\'s guide to GDPR', '(Admin)', 'gdpr-framework'); ?>
|
17 |
</a>
|
@@ -20,7 +21,7 @@
|
|
20 |
</p>
|
21 |
</div>
|
22 |
<div class="col">
|
23 |
-
<div class="col_image" style="background-image:url('<?= gdpr
|
24 |
<a class="button button-primary" href="<?= gdpr('helpers')->knowledgeBase(); ?>" target="_blank">
|
25 |
<?= esc_html_x('Knowledge base', '(Admin)', 'gdpr-framework'); ?>
|
26 |
</a>
|
@@ -29,7 +30,7 @@
|
|
29 |
</p>
|
30 |
</div>
|
31 |
<div class="col">
|
32 |
-
<div class="col_image" style="background-image:url('<?= gdpr
|
33 |
<a class="button button-primary" href="<?= gdpr('helpers')->developerDocs(); ?>" target="_blank">
|
34 |
<?= esc_html_x('Developer\'s guide to GDPR', '(Admin)', 'gdpr-framework'); ?>
|
35 |
</a>
|
@@ -46,7 +47,7 @@
|
|
46 |
</h3>
|
47 |
<div class="row">
|
48 |
<div class="col">
|
49 |
-
<div class="col_image" style="background-image:url('<?= gdpr
|
50 |
<a class="button button-primary" href="<?=gdpr('helpers')->supportRequest()?>" target="_blank">
|
51 |
<?= esc_html_x('Submit a support request', '(Admin)', 'gdpr-framework'); ?>
|
52 |
</a>
|
@@ -55,7 +56,7 @@
|
|
55 |
</p>
|
56 |
</div>
|
57 |
<div class="col">
|
58 |
-
<div class="col_image" style="background-image:url('<?= gdpr
|
59 |
<a class="button button-primary" href="<?= gdpr('helpers')->docs('contact/'); ?>" target="_blank">
|
60 |
<?= esc_html_x('Request a consultation', '(Admin)', 'gdpr-framework'); ?>
|
61 |
</a>
|
1 |
+
<?php global $gdpr; ?>
|
2 |
<h2 class="align-center">
|
3 |
All done!
|
4 |
</h2>
|
12 |
</h3>
|
13 |
<div class="row">
|
14 |
<div class="col">
|
15 |
+
<div class="col_image" style="background-image:url('<?= $gdpr->PluginUrl; ?>/assets/1.png');"></div>
|
16 |
<a class="button button-primary" href="<?= gdpr('helpers')->siteOwnersGuide(); ?>" target="_blank">
|
17 |
<?= esc_html_x('Site Owner\'s guide to GDPR', '(Admin)', 'gdpr-framework'); ?>
|
18 |
</a>
|
21 |
</p>
|
22 |
</div>
|
23 |
<div class="col">
|
24 |
+
<div class="col_image" style="background-image:url('<?= $gdpr->PluginUrl; ?>/assets/2.png');"></div>
|
25 |
<a class="button button-primary" href="<?= gdpr('helpers')->knowledgeBase(); ?>" target="_blank">
|
26 |
<?= esc_html_x('Knowledge base', '(Admin)', 'gdpr-framework'); ?>
|
27 |
</a>
|
30 |
</p>
|
31 |
</div>
|
32 |
<div class="col">
|
33 |
+
<div class="col_image" style="background-image:url('<?= $gdpr->PluginUrl; ?>/assets/3.png');"></div>
|
34 |
<a class="button button-primary" href="<?= gdpr('helpers')->developerDocs(); ?>" target="_blank">
|
35 |
<?= esc_html_x('Developer\'s guide to GDPR', '(Admin)', 'gdpr-framework'); ?>
|
36 |
</a>
|
47 |
</h3>
|
48 |
<div class="row">
|
49 |
<div class="col">
|
50 |
+
<div class="col_image" style="background-image:url('<?= $gdpr->PluginUrl; ?>/assets/4.png');"></div>
|
51 |
<a class="button button-primary" href="<?=gdpr('helpers')->supportRequest()?>" target="_blank">
|
52 |
<?= esc_html_x('Submit a support request', '(Admin)', 'gdpr-framework'); ?>
|
53 |
</a>
|
56 |
</p>
|
57 |
</div>
|
58 |
<div class="col">
|
59 |
+
<div class="col_image" style="background-image:url('<?= $gdpr->PluginUrl; ?>/assets/5.png');"></div>
|
60 |
<a class="button button-primary" href="<?= gdpr('helpers')->docs('contact/'); ?>" target="_blank">
|
61 |
<?= esc_html_x('Request a consultation', '(Admin)', 'gdpr-framework'); ?>
|
62 |
</a>
|
views/installer/steps/privacy-safe.php
CHANGED
@@ -1,9 +1,10 @@
|
|
|
|
1 |
<h2>
|
2 |
Privacy Safe
|
3 |
</h2>
|
4 |
<hr>
|
5 |
<p class="gdpr-disclaimer">
|
6 |
-
<img src="<?php echo gdpr
|
7 |
style="float:right;margin:15px;" />
|
8 |
<p>Strengthen your reputation. The privacy safe seal assures your customers that your business is in compliance with
|
9 |
privacy laws and regulations. The privacy safe seal will verify that the GDPR Framework plugin is installed.</p>
|
1 |
+
<?php global $gdpr; ?>
|
2 |
<h2>
|
3 |
Privacy Safe
|
4 |
</h2>
|
5 |
<hr>
|
6 |
<p class="gdpr-disclaimer">
|
7 |
+
<img src="<?php echo $gdpr->PluginUrl;?>src/Components/PrivacySafe/Privacy-Safe-Brand.png"
|
8 |
style="float:right;margin:15px;" />
|
9 |
<p>Strengthen your reputation. The privacy safe seal assures your customers that your business is in compliance with
|
10 |
privacy laws and regulations. The privacy safe seal will verify that the GDPR Framework plugin is installed.</p>
|
views/modules/wordpress-comments/terms-checkbox.php
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
<p class="gdpr-terms-container">
|
2 |
<span for="gdpr_terms">
|
3 |
-
<input type="checkbox" required name="gdpr_terms" id="gdpr_terms" value="1" />
|
4 |
<?php $enabled = gdpr( 'options' )->get( 'enable_tac' ); ?>
|
5 |
<?php
|
|
|
6 |
wp_enqueue_script( 'jquery' );
|
7 |
-
wp_register_style( 'gdpr-consent-until', gdpr
|
8 |
-
wp_register_script( 'gdpr-consent-until-js', gdpr
|
9 |
wp_register_style( 'gdpr-consent-until-dashicons', includes_url() . '/css/dashicons.min.css', array(), true );
|
10 |
wp_enqueue_script( 'gdpr-consent-until-js' );
|
11 |
wp_enqueue_style( 'gdpr-consent-until' );
|
1 |
<p class="gdpr-terms-container">
|
2 |
<span for="gdpr_terms">
|
3 |
+
<input type="checkbox" required name="gdpr_terms" id="gdpr_terms" aria-label="GDPR Checkbox" value="1" />
|
4 |
<?php $enabled = gdpr( 'options' )->get( 'enable_tac' ); ?>
|
5 |
<?php
|
6 |
+
global $gdpr;
|
7 |
wp_enqueue_script( 'jquery' );
|
8 |
+
wp_register_style( 'gdpr-consent-until', $gdpr->PluginUrl . 'assets/css/consentuntil.min.css', array(), true );
|
9 |
+
wp_register_script( 'gdpr-consent-until-js', $gdpr->PluginUrl . 'assets/js/consentuntil.min.js', array(), true, true );
|
10 |
wp_register_style( 'gdpr-consent-until-dashicons', includes_url() . '/css/dashicons.min.css', array(), true );
|
11 |
wp_enqueue_script( 'gdpr-consent-until-js' );
|
12 |
wp_enqueue_style( 'gdpr-consent-until' );
|
views/modules/wordpress-user/dashboard/data-page/form-delete.php
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
<table class="form-table">
|
2 |
<tr>
|
3 |
<th>
|
@@ -15,7 +16,7 @@
|
|
15 |
<?= __('Delete all data we have gathered about you.', 'gdpr-framework') ?> <br/>
|
16 |
<?= __('If you have a user account on our site, it will also be deleted.', 'gdpr-framework') ?> <br/>
|
17 |
<?= __('Be careful - this action is permanent and CANNOT be undone.', 'gdpr-framework') ?>
|
18 |
-
<?php if (gdpr
|
19 |
<br/><strong class="gdpr_woo_note"><?= __("Note Regarding Order:", 'gdpr-framework') ?></strong><br/>
|
20 |
<?= __("Your order with status Processing will not get deleted until status change.", 'gdpr-framework') ?><br/>
|
21 |
<?= __("Your order with status Completed will get anonymize.", 'gdpr-framework') ?><br/>
|
1 |
+
<?php global $gdpr; ?>
|
2 |
<table class="form-table">
|
3 |
<tr>
|
4 |
<th>
|
16 |
<?= __('Delete all data we have gathered about you.', 'gdpr-framework') ?> <br/>
|
17 |
<?= __('If you have a user account on our site, it will also be deleted.', 'gdpr-framework') ?> <br/>
|
18 |
<?= __('Be careful - this action is permanent and CANNOT be undone.', 'gdpr-framework') ?>
|
19 |
+
<?php if ($gdpr->Options->get('enable_woo_compatibility') && class_exists('Woocommerce')){?>
|
20 |
<br/><strong class="gdpr_woo_note"><?= __("Note Regarding Order:", 'gdpr-framework') ?></strong><br/>
|
21 |
<?= __("Your order with status Processing will not get deleted until status change.", 'gdpr-framework') ?><br/>
|
22 |
<?= __("Your order with status Completed will get anonymize.", 'gdpr-framework') ?><br/>
|
views/modules/wordpress-user/registration-terms-checkbox.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<p class="gdpr-terms-container" style="margin-bottom: 10px">
|
2 |
<?php
|
3 |
-
|
4 |
wp_enqueue_script( 'jquery' );
|
5 |
-
wp_register_style( 'gdpr-consent-until', gdpr
|
6 |
-
wp_register_script( 'gdpr-consent-until-js', gdpr
|
7 |
wp_register_style( 'gdpr-consent-until-dashicons', includes_url() . '/css/dashicons.min.css', array(), true );
|
8 |
wp_enqueue_script( 'gdpr-consent-until-js' );
|
9 |
wp_enqueue_style( 'gdpr-consent-until' );
|
@@ -20,8 +20,8 @@
|
|
20 |
endif;
|
21 |
?>
|
22 |
<label>
|
23 |
-
<input type="checkbox" required name="gdpr_terms" id="gdpr_terms" value="1" />
|
24 |
-
<?php $enabled = gdpr
|
25 |
<?php if ($termsUrl && $enabled):
|
26 |
add_filter( 'gdpr-framework-consent-policy-with-terms', 'TermAndConditionWithPrivacyContent' );
|
27 |
$gdpr_text_policy_with_terms = apply_filters( 'gdpr-framework-consent-policy-with-terms', $gdpr_value, $gdpr_arg2, $gdpr_arg3 );
|
1 |
<p class="gdpr-terms-container" style="margin-bottom: 10px">
|
2 |
<?php
|
3 |
+
global $gdpr;
|
4 |
wp_enqueue_script( 'jquery' );
|
5 |
+
wp_register_style( 'gdpr-consent-until', $gdpr->PluginUrl . 'assets/css/consentuntil.min.css', array(), true );
|
6 |
+
wp_register_script( 'gdpr-consent-until-js', $gdpr->PluginUrl . 'assets/js/consentuntil.min.js', array(), true, true );
|
7 |
wp_register_style( 'gdpr-consent-until-dashicons', includes_url() . '/css/dashicons.min.css', array(), true );
|
8 |
wp_enqueue_script( 'gdpr-consent-until-js' );
|
9 |
wp_enqueue_style( 'gdpr-consent-until' );
|
20 |
endif;
|
21 |
?>
|
22 |
<label>
|
23 |
+
<input type="checkbox" required name="gdpr_terms" id="gdpr_terms" aria-label="GDPR Checkbox" value="1" />
|
24 |
+
<?php $enabled = $gdpr->Options->get('enable_tac');?>
|
25 |
<?php if ($termsUrl && $enabled):
|
26 |
add_filter( 'gdpr-framework-consent-policy-with-terms', 'TermAndConditionWithPrivacyContent' );
|
27 |
$gdpr_text_policy_with_terms = apply_filters( 'gdpr-framework-consent-policy-with-terms', $gdpr_value, $gdpr_arg2, $gdpr_arg3 );
|
views/privacy-tools/form-delete.php
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
-
|
|
|
|
|
2 |
<br/>
|
3 |
<p class="description">
|
4 |
<?= __('Delete all data we have gathered about you.', 'gdpr-framework') ?> <br/>
|
5 |
<?= __('If you have a user account on our site, it will also be deleted.', 'gdpr-framework') ?> <br/>
|
6 |
<?= __('Be careful - this action is permanent and CANNOT be undone.', 'gdpr-framework') ?>
|
7 |
-
<?php if (gdpr
|
8 |
<br/><strong class="gdpr_woo_note"><?= __("Note Regarding Order:", 'gdpr-framework') ?></strong><br/>
|
9 |
<?= __("Your order with status Processing will not get deleted until status change.", 'gdpr-framework') ?><br/>
|
10 |
<?= __("Your order with status Completed will get anonymize.", 'gdpr-framework') ?><br/>
|
1 |
+
<?php global $gdpr; ?>
|
2 |
+
|
3 |
+
<h2><?= ($gdpr->Options->get('gdpr_delete_text') != '') ? $gdpr->Options->get('gdpr_delete_text') : __('Delete my user and data', 'gdpr-framework') ?></h2>
|
4 |
<br/>
|
5 |
<p class="description">
|
6 |
<?= __('Delete all data we have gathered about you.', 'gdpr-framework') ?> <br/>
|
7 |
<?= __('If you have a user account on our site, it will also be deleted.', 'gdpr-framework') ?> <br/>
|
8 |
<?= __('Be careful - this action is permanent and CANNOT be undone.', 'gdpr-framework') ?>
|
9 |
+
<?php if ($gdpr->Options->get('enable_woo_compatibility') && class_exists('Woocommerce')){?>
|
10 |
<br/><strong class="gdpr_woo_note"><?= __("Note Regarding Order:", 'gdpr-framework') ?></strong><br/>
|
11 |
<?= __("Your order with status Processing will not get deleted until status change.", 'gdpr-framework') ?><br/>
|
12 |
<?= __("Your order with status Completed will get anonymize.", 'gdpr-framework') ?><br/>
|