2
2
3
3
namespace Safe ;
4
4
5
+ use Safe \Exceptions \ApcException ;
6
+
5
7
/**
6
8
* apc_cas updates an already existing integer value if the
7
9
* old parameter matches the currently stored value
10
12
* @param string $key The key of the value being updated.
11
13
* @param int $old The old value (the value currently stored).
12
14
* @param int $new The new value to update to.
13
- * @throws Exceptions\ ApcException
15
+ * @throws ApcException
14
16
*
15
17
*/
16
18
function apc_cas (string $ key , int $ old , int $ new ): void
17
19
{
18
20
error_clear_last ();
19
21
$ result = \apc_cas ($ key , $ old , $ new );
20
22
if ($ result === FALSE ) {
21
- throw Exceptions \ ApcException::createFromPhpError ();
23
+ throw ApcException::createFromPhpError ();
22
24
}
23
25
}
24
26
@@ -30,15 +32,15 @@ function apc_cas(string $key, int $old, int $new): void
30
32
* the bytecode cache.
31
33
* @param bool $atomic
32
34
* @return mixed Returns TRUE on success .
33
- * @throws Exceptions\ ApcException
35
+ * @throws ApcException
34
36
*
35
37
*/
36
38
function apc_compile_file (string $ filename , bool $ atomic = true )
37
39
{
38
40
error_clear_last ();
39
41
$ result = \apc_compile_file ($ filename , $ atomic );
40
42
if ($ result === FALSE ) {
41
- throw Exceptions \ ApcException::createFromPhpError ();
43
+ throw ApcException::createFromPhpError ();
42
44
}
43
45
return $ result ;
44
46
}
@@ -53,7 +55,7 @@ function apc_compile_file(string $filename, bool $atomic = true)
53
55
* this referenced variable.
54
56
* @return int Returns the current value of key's value on success,
55
57
*
56
- * @throws Exceptions\ ApcException
58
+ * @throws ApcException
57
59
*
58
60
*/
59
61
function apc_dec (string $ key , int $ step = 1 , bool &$ success = null ): int
@@ -65,7 +67,7 @@ function apc_dec(string $key, int $step = 1, bool &$success = null): int
65
67
$ result = \apc_dec ($ key , $ step );
66
68
}
67
69
if ($ result === FALSE ) {
68
- throw Exceptions \ ApcException::createFromPhpError ();
70
+ throw ApcException::createFromPhpError ();
69
71
}
70
72
return $ result ;
71
73
}
@@ -91,15 +93,15 @@ function apc_dec(string $key, int $step = 1, bool &$success = null): int
91
93
* i.e. CONSTANT and Constant
92
94
* represent different values. If this parameter evaluates to FALSE the
93
95
* constants will be declared as case-insensitive symbols.
94
- * @throws Exceptions\ ApcException
96
+ * @throws ApcException
95
97
*
96
98
*/
97
99
function apc_define_constants (string $ key , array $ constants , bool $ case_sensitive = true ): void
98
100
{
99
101
error_clear_last ();
100
102
$ result = \apc_define_constants ($ key , $ constants , $ case_sensitive );
101
103
if ($ result === FALSE ) {
102
- throw Exceptions \ ApcException::createFromPhpError ();
104
+ throw ApcException::createFromPhpError ();
103
105
}
104
106
}
105
107
@@ -114,15 +116,15 @@ function apc_define_constants(string $key, array $constants, bool $case_sensitiv
114
116
* Or if keys is an array, then
115
117
* an empty array is returned on success, or an array of failed files
116
118
* is returned.
117
- * @throws Exceptions\ ApcException
119
+ * @throws ApcException
118
120
*
119
121
*/
120
122
function apc_delete_file ($ keys )
121
123
{
122
124
error_clear_last ();
123
125
$ result = \apc_delete_file ($ keys );
124
126
if ($ result === FALSE ) {
125
- throw Exceptions \ ApcException::createFromPhpError ();
127
+ throw ApcException::createFromPhpError ();
126
128
}
127
129
return $ result ;
128
130
}
@@ -133,15 +135,15 @@ function apc_delete_file($keys)
133
135
*
134
136
* @param string|string[]|APCIterator $key The key used to store the value (with
135
137
* apc_store).
136
- * @throws Exceptions\ ApcException
138
+ * @throws ApcException
137
139
*
138
140
*/
139
141
function apc_delete (string $ key )
140
142
{
141
143
error_clear_last ();
142
144
$ result = \apc_delete ($ key );
143
145
if ($ result === FALSE ) {
144
- throw Exceptions \ ApcException::createFromPhpError ();
146
+ throw ApcException::createFromPhpError ();
145
147
}
146
148
return $ result ;
147
149
}
@@ -156,7 +158,7 @@ function apc_delete(string $key)
156
158
* this referenced variable.
157
159
* @return int Returns the current value of key's value on success,
158
160
*
159
- * @throws Exceptions\ ApcException
161
+ * @throws ApcException
160
162
*
161
163
*/
162
164
function apc_inc (string $ key , int $ step = 1 , bool &$ success = null ): int
@@ -168,7 +170,7 @@ function apc_inc(string $key, int $step = 1, bool &$success = null): int
168
170
$ result = \apc_inc ($ key , $ step );
169
171
}
170
172
if ($ result === FALSE ) {
171
- throw Exceptions \ ApcException::createFromPhpError ();
173
+ throw ApcException::createFromPhpError ();
172
174
}
173
175
return $ result ;
174
176
}
@@ -183,15 +185,15 @@ function apc_inc(string $key, int $step = 1, bool &$success = null): int
183
185
* i.e. CONSTANT and Constant
184
186
* represent different values. If this parameter evaluates to FALSE the
185
187
* constants will be declared as case-insensitive symbols.
186
- * @throws Exceptions\ ApcException
188
+ * @throws ApcException
187
189
*
188
190
*/
189
191
function apc_load_constants (string $ key , bool $ case_sensitive = true ): void
190
192
{
191
193
error_clear_last ();
192
194
$ result = \apc_load_constants ($ key , $ case_sensitive );
193
195
if ($ result === FALSE ) {
194
- throw Exceptions \ ApcException::createFromPhpError ();
196
+ throw ApcException::createFromPhpError ();
195
197
}
196
198
}
197
199
0 commit comments