GRAYBYTE WORDPRESS FILE MANAGER3375

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/trustyourlawyer.com/wp-content/plugins/backwpup/inc/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/trustyourlawyer.com/wp-content/plugins/backwpup/inc//class-s3-destination.php
<?php

declare(strict_types=1);

use Aws\S3\S3Client;

/**
 * Class BackWPup_S3_Destination.
 */
final class BackWPup_S3_Destination
{
    /**
     * @var array
     */
    private $options;

    /**
     * BackWPup_S3_Destination constructor.
     */
    private function __construct(array $options)
    {
        $defaults = [
            'label' => __('Custom S3 destination', 'backwpup'),
            'endpoint' => '',
            'region' => '',
            'multipart' => true,
            'only_path_style_bucket' => false,
            'version' => 'latest',
            'signature' => 'v4',
        ];

        $this->options = array_merge($defaults, $options);
    }

    /**
     * Get list of S3 destinations.
     *
     * This list can be extended by using the `backwpup_s3_destination` filter.
	 */
	public static function options(): array {
		return wpm_apply_filters_typed(
			'array',
			'backwpup_s3_destination',
            [
                'us-east-2' => [
                    'label' => __('Amazon S3: US East (Ohio)', 'backwpup'),
                    'region' => 'us-east-2',
                    'multipart' => true,
                ],
                'us-east-1' => [
                    'label' => __('Amazon S3: US East (N. Virginia)', 'backwpup'),
                    'region' => 'us-east-1',
                    'multipart' => true,
                ],
                'us-west-1' => [
                    'label' => __('Amazon S3: US West (N. California)', 'backwpup'),
                    'region' => 'us-west-1',
                    'multipart' => true,
                ],
                'us-west-2' => [
                    'label' => __('Amazon S3: US West (Oregon)', 'backwpup'),
                    'region' => 'us-west-2',
                    'multipart' => true,
                ],
                'af-south-1' => [
                    'label' => __('Amazon S3: Africa (Cape Town)', 'backwpup'),
                    'region' => 'af-south-1',
                    'multipart' => true,
                ],
                'ap-east-1' => [
                    'label' => __('Amazon S3: Asia Pacific (Hong Kong)', 'backwpup'),
                    'region' => 'ap-east-1',
                    'multipart' => true,
                ],
                'ap-southeast-3' => [
                    'label' => __('Amazon S3: Asia Pacific (Jakarta)', 'backwpup'),
                    'region' => 'ap-southeast-3',
                    'multipart' => true,
                ],
                'ap-south-1' => [
                    'label' => __('Amazon S3: Asia Pacific (Mumbai)', 'backwpup'),
                    'region' => 'ap-south-1',
                    'multipart' => true,
                ],
                'ap-northeast-3' => [
                    'label' => __('Amazon S3: Asia Pacific (Osaka)', 'backwpup'),
                    'region' => 'ap-northeast-3',
                    'multipart' => true,
                ],
                'ap-northeast-2' => [
                    'label' => __('Amazon S3: Asia Pacific (Seoul)', 'backwpup'),
                    'region' => 'ap-northeast-2',
                    'multipart' => true,
                ],
                'ap-southeast-1' => [
                    'label' => __('Amazon S3: Asia Pacific (Singapore)', 'backwpup'),
                    'region' => 'ap-southeast-1',
                    'multipart' => true,
                ],
                'ap-southeast-2' => [
                    'label' => __('Amazon S3: Asia Pacific (Sydney)', 'backwpup'),
                    'region' => 'ap-southeast-2',
                    'multipart' => true,
                ],
                'ap-northeast-1' => [
                    'label' => __('Amazon S3: Asia Pacific (Tokyo)', 'backwpup'),
                    'region' => 'ap-northeast-1',
                    'multipart' => true,
                ],
                'ca-central-1' => [
                    'label' => __('Amazon S3: Canada (Central)', 'backwpup'),
                    'region' => 'ca-central-1',
                    'multipart' => true,
                ],
                'eu-central-1' => [
                    'label' => __('Amazon S3: Europe (Frankfurt)', 'backwpup'),
                    'region' => 'eu-central-1',
                    'multipart' => true,
                ],
                'eu-west-1' => [
                    'label' => __('Amazon S3: Europe (Ireland)', 'backwpup'),
                    'region' => 'eu-west-1',
                    'multipart' => true,
                ],
                'eu-west-2' => [
                    'label' => __('Amazon S3: Europe (London)', 'backwpup'),
                    'region' => 'eu-west-2',
                    'multipart' => true,
                ],
                'eu-south-1' => [
                    'label' => __('Amazon S3: Europe (Milan)', 'backwpup'),
                    'region' => 'eu-south-1',
                    'multipart' => true,
                ],
                'eu-west-3' => [
                    'label' => __('Amazon S3: Europe (Paris)', 'backwpup'),
                    'region' => 'eu-west-3',
                    'multipart' => true,
                ],
                'eu-north-1' => [
                    'label' => __('Amazon S3: Europe (Stockholm)', 'backwpup'),
                    'region' => 'eu-north-1',
                    'multipart' => true,
                ],
                'me-south-1' => [
                    'label' => __('Amazon S3: Middle East (Bahrain)', 'backwpup'),
                    'region' => 'me-south-1',
                    'multipart' => true,
                ],
                'sa-east-1' => [
                    'label' => __('Amazon S3: South America (São Paulo)', 'backwpup'),
                    'region' => 'sa-east-1',
                    'multipart' => true,
                ],
                'us-gov-east-1' => [
                    'label' => __('Amazon S3: AWS GovCloud (US-East)', 'backwpup'),
                    'region' => 'us-gov-east-1',
                    'multipart' => true,
                ],
                'us-gov-west-1' => [
                    'label' => __('Amazon S3: AWS GovCloud (US-West)', 'backwpup'),
                    'region' => 'us-gov-west-1',
                    'multipart' => true,
                ],
                'google-storage' => [
                    'label' => __('Google Storage: EU (Multi-Regional)', 'backwpup'),
                    'region' => 'EU',
                    'endpoint' => 'https://storage.googleapis.com',
                ],
                'google-storage-us' => [
                    'label' => __('Google Storage: USA (Multi-Regional)', 'backwpup'),
                    'region' => 'US',
                    'endpoint' => 'https://storage.googleapis.com',
                ],
                'google-storage-asia' => [
                    'label' => __('Google Storage: Asia (Multi-Regional)', 'backwpup'),
                    'region' => 'ASIA',
                    'endpoint' => 'https://storage.googleapis.com',
                ],
                'dreamhost' => [
                    'label' => __('Dream Host Cloud Storage', 'backwpup'),
                    'endpoint' => 'https://objects-us-west-1.dream.io',
                ],
                'digital-ocean-sfo2' => [
                    'label' => __('DigitalOcean: SFO2', 'backwpup'),
                    'endpoint' => 'https://sfo2.digitaloceanspaces.com',
                ],
                'digital-ocean-nyc3' => [
                    'label' => __('DigitalOcean: NYC3', 'backwpup'),
                    'endpoint' => 'https://nyc3.digitaloceanspaces.com',
                ],
                'digital-ocean-ams3' => [
                    'label' => __('DigitalOcean: AMS3', 'backwpup'),
                    'endpoint' => 'https://ams3.digitaloceanspaces.com',
                ],
                'digital-ocean-sgp1' => [
                    'label' => __('DigitalOcean: SGP1', 'backwpup'),
                    'endpoint' => 'https://sgp1.digitaloceanspaces.com',
                ],
                'digital-ocean-fra1' => [
                    'label' => __('DigitalOcean: FRA1', 'backwpup'),
                    'endpoint' => 'https://fra1.digitaloceanspaces.com',
                ],
                'scaleway-ams' => [
                    'label' => __('Scaleway: AMS', 'backwpup'),
                    'region' => 'nl-ams',
                    'endpoint' => 'https://s3.nl-ams.scw.cloud',
                ],
                'scaleway-par' => [
                    'label' => __('Scaleway: PAR', 'backwpup'),
                    'region' => 'fr-par',
                    'endpoint' => 'https://s3.fr-par.scw.cloud',
                ],
            ]
        );
    }

    /**
     * Get the AWS destination of the passed id or base url.
     *
     * @param string $idOrUrl Destination id or endpoint
     */
    public static function fromOption(string $idOrUrl): self
    {
        $destinations = self::options();

        return new self($destinations[$idOrUrl]);
    }

    /**
     * Get the AWS destination class from options array.
     *
     * @param array $optionsArr S3 options
     */
    public static function fromOptionArray(array $optionsArr): self
    {
        return new self($optionsArr);
    }

    /**
     * Get the AWS destination class from job ID.
     *
     * @param int $jobId The job ID to get options from
     */
    public static function fromJobId(int $jobId): self
    {
        $options = [
            'label' => __('Custom S3 destination', 'backwpup'),
            'endpoint' => BackWPup_Option::get($jobId, 's3base_url'),
            'region' => BackWPup_Option::get($jobId, 's3base_region'),
            'multipart' => !empty(BackWPup_Option::get($jobId, 's3base_multipart')),
            'only_path_style_bucket' => !empty(BackWPup_Option::get($jobId, 's3base_pathstylebucket')),
            'version' => BackWPup_Option::get($jobId, 's3base_version'),
            'signature' => BackWPup_Option::get($jobId, 's3base_signature'),
        ];

        return self::fromOptionArray($options);
    }

    /**
     * Get the Amazon S3 Client.
	 *
	 * @param string $access_key access key.
	 * @param string $secret_key secret key.
	 */
	public function client( $access_key, $secret_key ): S3Client {
		$s3_options = [
			'signature'               => $this->signature(),
			'credentials'             => [
				'key'    => $access_key,
				'secret' => BackWPup_Encryption::decrypt( $secret_key ),
			],
            'region' => $this->region(),
            'http' => [
                'verify' => BackWPup::get_plugin_data('cacert'),
            ],
            'version' => $this->version(),
            'use_path_style_endpoint' => $this->onlyPathStyleBucket(),
        ];

		if ( $this->endpoint() ) {
			$s3_options['endpoint'] = $this->endpoint();
			if ( ! $this->region() ) {
				$s3_options['bucket_endpoint'] = true;
			}
        }

		$s3_options = wpm_apply_filters_typed( 'array', 'backwpup_s3_client_options', $s3_options );

		return new S3Client( $s3_options );
	}

    /**
     * The label of the destination.
     */
    public function label(): string
    {
        return $this->options['label'];
    }

    /**
     * The region of the destination.
     */
    public function region(): string
    {
        return $this->options['region'];
    }

    /**
     * The base url of the option. If empty than it should be a original AWS.
     */
    public function endpoint(): string
    {
        return $this->options['endpoint'];
    }

    /**
     * The s3 version for the api like '2006-03-01'.
     */
    public function version(): string
    {
        return $this->options['version'];
    }

    /**
     * The signature for the api like 'v4'.
     */
    public function signature(): string
    {
        return $this->options['signature'];
    }

    /**
     * Destination supports multipart uploads.
     */
    public function supportsMultipart(): bool
    {
        return (bool) $this->options['multipart'];
    }

    /**
     * Destination support only path style buckets.
     */
    public function onlyPathStyleBucket(): bool
    {
        return (bool) $this->options['only_path_style_bucket'];
    }
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:29
giriqfky / giriqfky
0755
Notice
--
July 10 2025 04:32:37
giriqfky / giriqfky
0755
Settings
--
July 10 2025 04:32:37
giriqfky / giriqfky
0755
ThirdParty
--
July 10 2025 04:32:37
giriqfky / giriqfky
0755
Utils
--
July 10 2025 04:32:37
giriqfky / giriqfky
0755
dependencies
--
July 10 2025 04:32:37
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:37
giriqfky / giriqfky
0644
BackWPup.php
11.618 KB
May 20 2025 11:41:24
giriqfky / giriqfky
0644
class-admin.php
44.521 KB
May 20 2025 11:41:24
giriqfky / giriqfky
0644
class-adminbar.php
2.676 KB
May 20 2025 11:41:24
giriqfky / giriqfky
0644
class-create-archive-exception.php
0.148 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-create-archive.php
27.247 KB
March 10 2025 14:47:06
giriqfky / giriqfky
0644
class-cron.php
18.585 KB
April 29 2025 17:34:12
giriqfky / giriqfky
0644
class-destination-connect-exception.php
0.218 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-destination-connect-interface.php
0.647 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-destination-download-exception.php
0.202 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-destination-downloader-data.php
1.223 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-destination-downloader-factory.php
1.629 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-destination-downloader-interface.php
0.52 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-destination-downloader.php
5.126 KB
June 04 2024 10:51:14
giriqfky / giriqfky
0644
class-destination-dropbox-api-exception.php
0.129 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-destination-dropbox-api-request-exception.php
0.595 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-destination-dropbox-api.php
40.892 KB
February 13 2025 20:02:44
giriqfky / giriqfky
0644
class-destination-dropbox-downloader.php
2.907 KB
October 18 2023 17:06:40
giriqfky / giriqfky
0644
class-destination-dropbox.php
21.399 KB
May 20 2025 11:41:24
giriqfky / giriqfky
0644
class-destination-email.php
19.876 KB
April 23 2025 14:14:02
giriqfky / giriqfky
0644
class-destination-folder-downloader.php
3.488 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-destination-folder.php
10.113 KB
April 07 2025 18:31:08
giriqfky / giriqfky
0644
class-destination-ftp-connect.php
5.373 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-destination-ftp-downloader.php
3.351 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-destination-ftp.php
29.519 KB
April 07 2025 18:31:08
giriqfky / giriqfky
0644
class-destination-msazure-downloader.php
3.369 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-destination-msazure.php
26.319 KB
February 04 2025 14:50:44
giriqfky / giriqfky
0644
class-destination-rsc.php
22.318 KB
March 21 2025 15:27:30
giriqfky / giriqfky
0644
class-destination-s3-downloader.php
3.298 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-destination-s3.php
48.635 KB
April 07 2025 18:31:08
giriqfky / giriqfky
0644
class-destination-sugarsync.php
38.054 KB
February 04 2025 14:50:44
giriqfky / giriqfky
0644
class-destinations.php
6.154 KB
April 07 2025 18:31:08
giriqfky / giriqfky
0644
class-directory.php
6.025 KB
April 23 2025 14:14:02
giriqfky / giriqfky
0644
class-download-file-interface.php
0.609 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-download-file.php
3.406 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-download-handler.php
1.956 KB
October 18 2023 17:06:40
giriqfky / giriqfky
0644
class-easycron.php
8.057 KB
October 01 2024 16:10:48
giriqfky / giriqfky
0644
class-encryption-fallback.php
2.875 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-encryption-mcrypt.php
4.014 KB
March 03 2025 19:19:24
giriqfky / giriqfky
0644
class-encryption-openssl.php
3.925 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-encryption.php
6.265 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-factory-exception.php
0.191 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-file.php
10.787 KB
March 13 2025 16:05:40
giriqfky / giriqfky
0644
class-help.php
1.745 KB
October 18 2023 17:06:40
giriqfky / giriqfky
0644
class-install.php
18.464 KB
April 23 2025 14:14:02
giriqfky / giriqfky
0644
class-job.php
105.758 KB
May 20 2025 11:41:24
giriqfky / giriqfky
0644
class-jobtype-dbcheck.php
6.386 KB
October 18 2023 17:06:40
giriqfky / giriqfky
0644
class-jobtype-dbdump.php
11.304 KB
April 07 2025 18:31:08
giriqfky / giriqfky
0644
class-jobtype-file.php
24.155 KB
April 07 2025 18:31:08
giriqfky / giriqfky
0644
class-jobtype-wpexp.php
34.94 KB
March 13 2025 16:05:40
giriqfky / giriqfky
0644
class-jobtype-wpplugin.php
6.864 KB
March 03 2025 19:19:24
giriqfky / giriqfky
0644
class-jobtypes.php
2.25 KB
April 07 2025 18:31:08
giriqfky / giriqfky
0644
class-message-box.php
3.464 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-migrate.php
10.691 KB
April 23 2025 14:14:02
giriqfky / giriqfky
0644
class-msazure-destination-configuration.php
1.597 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-mysqldump.php
34.067 KB
June 19 2024 12:40:40
giriqfky / giriqfky
0644
class-option.php
18.498 KB
April 23 2025 14:14:02
giriqfky / giriqfky
0644
class-page-about.php
27.481 KB
June 19 2024 12:40:40
giriqfky / giriqfky
0644
class-page-backups.php
20.81 KB
April 23 2025 14:14:02
giriqfky / giriqfky
0644
class-page-backwpup.php
21.946 KB
October 18 2023 17:06:40
giriqfky / giriqfky
0644
class-page-editjob.php
47.442 KB
April 23 2025 14:14:02
giriqfky / giriqfky
0644
class-page-firstbackup.php
0.556 KB
February 04 2025 14:50:44
giriqfky / giriqfky
0644
class-page-jobs.php
44.727 KB
April 23 2025 14:14:02
giriqfky / giriqfky
0644
class-page-logs.php
13.824 KB
April 23 2025 14:14:02
giriqfky / giriqfky
0644
class-page-onboarding.php
6.948 KB
May 20 2025 11:41:24
giriqfky / giriqfky
0644
class-page-restore.php
5.368 KB
April 07 2025 18:31:08
giriqfky / giriqfky
0644
class-page-settings.php
45.41 KB
April 07 2025 18:31:08
giriqfky / giriqfky
0644
class-path-fixer.php
0.815 KB
October 18 2023 17:06:40
giriqfky / giriqfky
0644
class-recursive-directory.php
0.573 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-s3-destination.php
11.986 KB
March 13 2025 16:05:40
giriqfky / giriqfky
0644
class-sanitize-path.php
1.547 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-system-requirements.php
1.231 KB
October 01 2024 16:10:48
giriqfky / giriqfky
0644
class-system-tests-runner.php
9.5 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-system-tests.php
3.469 KB
November 16 2022 17:55:50
giriqfky / giriqfky
0644
class-thirdparties.php
1.023 KB
June 19 2024 12:40:40
giriqfky / giriqfky
0644
class-wp-api.php
43.999 KB
April 29 2025 17:34:12
giriqfky / giriqfky
0644
class-wp-cli.php
11.83 KB
April 23 2025 14:14:02
giriqfky / giriqfky
0644
functions.php
5.883 KB
April 30 2025 17:12:56
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF