src/includes/classes/Core/Utils/Aws.php
public function cloudFrontSignUrl(string $url, int $expires_after = 86400, array $args = [], array $client_args = []): string
    {
        $default_args = [ // Global config defaults.
            'key_pair_id' => $this->App->Config->©aws['©cf_key_pair_id'],
            'private_key' => $this->App->Config->©aws['©cf_private_key_file'],
        ];
        $args            = array_replace_recursive($default_args, $args);
        $args['url']     = $url; // `url` and `expires` via params.
        $args['expires'] = time() + max(0, $expires_after);

        $CloudFrontClient  = $this->cloudFrontClient($client_args);
        return $signed_url = $CloudFrontClient->getSignedUrl($args);
    }
public function cloudFrontSignUrl(string $url, int $expires_after = 86400, array $args = [], array $client_args = []): string
    {
        $default_args = [ // Global config defaults.
            'key_pair_id' => $this->App->Config->©aws['©cf_key_pair_id'],
            'private_key' => $this->App->Config->©aws['©cf_private_key_file'],
        ];
        $args            = array_replace_recursive($default_args, $args);
        $args['url']     = $url; // `url` and `expires` via params.
        $args['expires'] = time() + max(0, $expires_after);

        $CloudFrontClient  = $this->cloudFrontClient($client_args);
        return $signed_url = $CloudFrontClient->getSignedUrl($args);
    }
CloudFront URL signer.

@since 170421.57490 Magic overload handler.

@param string $url           URL to sign.
@param int    $expires_after Expiration in seconds.
@param array  $args          Args to URL signer.
@param array  $client_args   Client instance args.

@return string Digitally signed URL.