Blame view

vendor/alibabacloud/client/src/Traits/DefaultRegionTrait.php 1.3 KB
f0d6cde5   xu   vendor
1
2
3
4
5
<?php

namespace AlibabaCloud\Client\Traits;

use AlibabaCloud\Client\AlibabaCloud;
f0d6cde5   xu   vendor
6
use AlibabaCloud\Client\Exception\ClientException;
0c34aba8   xu   更新阿里云短信接口
7
use AlibabaCloud\Client\Filter\ClientFilter;
f0d6cde5   xu   vendor
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

/**
 * Trait DefaultRegionTrait
 *
 * @package   AlibabaCloud\Client\Traits
 *
 * @mixin     AlibabaCloud
 */
trait DefaultRegionTrait
{
    /**
     * @var string|null Default RegionId
     */
    protected static $defaultRegionId;

    /**
0c34aba8   xu   更新阿里云短信接口
24
     * @deprecated
f0d6cde5   xu   vendor
25
26
     * @codeCoverageIgnore
     *
0c34aba8   xu   更新阿里云短信接口
27
28
     * @param string $regionId
     *
f0d6cde5   xu   vendor
29
30
31
32
33
34
35
     * @throws ClientException
     */
    public static function setGlobalRegionId($regionId)
    {
        self::setDefaultRegionId($regionId);
    }

0c34aba8   xu   更新阿里云短信接口
36
    /**
f0d6cde5   xu   vendor
37
38
     * Set the default RegionId.
     *
f0d6cde5   xu   vendor
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
     * @param string $regionId
     *
     * @throws ClientException
     */
    public static function setDefaultRegionId($regionId)
    {
        ClientFilter::regionId($regionId);

        self::$defaultRegionId = $regionId;
    }

    /**
     * @deprecated
     * @codeCoverageIgnore
     *
0c34aba8   xu   更新阿里云短信接口
54
55
56
57
58
59
60
61
62
63
64
65
     * @return string|null
     */
    public static function getGlobalRegionId()
    {
        return self::getDefaultRegionId();
    }

    /**
     * Get the default RegionId.
     *
     * @return string|null
     */
f0d6cde5   xu   vendor
66
    public static function getDefaultRegionId()