vendor/braintree/braintree_php/lib/Braintree.php

(完整代码) 886B

<?php // phpcs:disable

require_once(__DIR__ . DIRECTORY_SEPARATOR . 'autoload.php');

if (version_compare(PHP_VERSION, '7.3.0', '<')) {
    throw new Braintree\Exception('PHP version >= 7.3.0 required');
}

/**
 * Braintree PHP Library
 * Creates class_aliases for old class names replaced by PSR-4 Namespaces
 */
class Braintree
{
    /**
     * Checks for required dependencies
     *
     * @throws Braintree/Exception With the missing extension
     *
     * @return void
     */
    public static function requireDependencies()
    {
        $requiredExtensions = ['xmlwriter', 'openssl', 'dom', 'hash', 'curl'];
        foreach ($requiredExtensions as $ext) {
            if (!extension_loaded($ext)) {
                throw new Braintree\Exception('The Braintree library requires the ' . $ext . ' extension.');
            }
        }
    }
}

Braintree::requireDependencies();

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。