1 | <?php |
||
9 | class Smsa |
||
10 | { |
||
11 | use MethodsRedirector; |
||
12 | /** |
||
13 | * The base Smsa manager instance. |
||
14 | * |
||
15 | * @var \SmsaSDK\SmsaManager|null |
||
16 | */ |
||
17 | private static $smsaManager = null; |
||
18 | |||
19 | /** |
||
20 | * setUp |
||
21 | * Set up Smsa Configuration by the given config array |
||
22 | * The array has 'key' and 'uri' as keys to it's values. |
||
23 | * |
||
24 | * @param array|null $config |
||
25 | * |
||
26 | * @return static |
||
27 | */ |
||
28 | 1 | public static function setUp($config = []) |
|
34 | |||
35 | /** |
||
36 | * nullValues |
||
37 | * Set the default value of the empty values that shall be sent to SECOM. |
||
38 | * |
||
39 | * @return static |
||
40 | */ |
||
41 | 1 | public static function nullValues($value) |
|
47 | |||
48 | /** |
||
49 | * uri |
||
50 | * Set the WSDL uri. |
||
51 | * |
||
52 | * @return static |
||
53 | */ |
||
54 | public static function uri($uri) |
||
60 | |||
61 | /** |
||
62 | * key |
||
63 | * Set the SMSA Key. |
||
64 | * |
||
65 | * @return static |
||
66 | */ |
||
67 | 2 | public static function key($passkey) |
|
73 | |||
74 | /** |
||
75 | * __callStatic |
||
76 | * Calling static methods. |
||
77 | * |
||
78 | * @param string $method |
||
79 | * @param array $arguments |
||
80 | * |
||
81 | * @return |
||
82 | */ |
||
83 | 7 | public static function __callStatic($method, $arguments) |
|
87 | |||
88 | /** |
||
89 | * handleStaticCalls. |
||
90 | * |
||
91 | * @param string $method |
||
92 | * @param array $arguments |
||
93 | * |
||
94 | * @return |
||
95 | */ |
||
96 | 8 | public static function handleStaticCalls($method, $arguments) |
|
104 | |||
105 | /** |
||
106 | * setManager |
||
107 | * Set the base Smsa manager. |
||
108 | * |
||
109 | * @param SmsaSDK\SmsaManager|null|mixed $smsaManager |
||
110 | * |
||
111 | * @return void |
||
112 | */ |
||
113 | 6 | protected static function setManager($smsaManager = null) |
|
117 | |||
118 | /** |
||
119 | * refresh |
||
120 | * Refresh the Smsa manager instance by providing alternative instance if possible. |
||
121 | * |
||
122 | * @param SmsaSDK\SmsaManager|null|mixed $altSmsaManagaer |
||
123 | * |
||
124 | * @return void |
||
125 | */ |
||
126 | 5 | public static function refresh($altSmsaManagaer = null) |
|
130 | } |
||
131 |
Let’s assume you have a class which uses late-static binding:
The code above will run fine in your PHP runtime. However, if you now create a sub-class and call the
getSomeVariable()
on that sub-class, you will receive a runtime error:In the case above, it makes sense to update
SomeClass
to useself
instead: