22
33namespace Safe ;
44
5+ use Safe \Exceptions \ApcException ;
6+
57/**
68 * apc_cas updates an already existing integer value if the
79 * old parameter matches the currently stored value
1012 * @param string $key The key of the value being updated.
1113 * @param int $old The old value (the value currently stored).
1214 * @param int $new The new value to update to.
13- * @throws Exceptions\ ApcException
15+ * @throws ApcException
1416 *
1517 */
1618function apc_cas (string $ key , int $ old , int $ new ): void
1719{
1820 error_clear_last ();
1921 $ result = \apc_cas ($ key , $ old , $ new );
2022 if ($ result === FALSE ) {
21- throw Exceptions \ ApcException::createFromPhpError ();
23+ throw ApcException::createFromPhpError ();
2224 }
2325}
2426
@@ -30,15 +32,15 @@ function apc_cas(string $key, int $old, int $new): void
3032 * the bytecode cache.
3133 * @param bool $atomic
3234 * @return mixed Returns TRUE on success .
33- * @throws Exceptions\ ApcException
35+ * @throws ApcException
3436 *
3537 */
3638function apc_compile_file (string $ filename , bool $ atomic = true )
3739{
3840 error_clear_last ();
3941 $ result = \apc_compile_file ($ filename , $ atomic );
4042 if ($ result === FALSE ) {
41- throw Exceptions \ ApcException::createFromPhpError ();
43+ throw ApcException::createFromPhpError ();
4244 }
4345 return $ result ;
4446}
@@ -53,7 +55,7 @@ function apc_compile_file(string $filename, bool $atomic = true)
5355 * this referenced variable.
5456 * @return int Returns the current value of key's value on success,
5557 *
56- * @throws Exceptions\ ApcException
58+ * @throws ApcException
5759 *
5860 */
5961function 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
6567 $ result = \apc_dec ($ key , $ step );
6668 }
6769 if ($ result === FALSE ) {
68- throw Exceptions \ ApcException::createFromPhpError ();
70+ throw ApcException::createFromPhpError ();
6971 }
7072 return $ result ;
7173}
@@ -91,15 +93,15 @@ function apc_dec(string $key, int $step = 1, bool &$success = null): int
9193 * i.e. CONSTANT and Constant
9294 * represent different values. If this parameter evaluates to FALSE the
9395 * constants will be declared as case-insensitive symbols.
94- * @throws Exceptions\ ApcException
96+ * @throws ApcException
9597 *
9698 */
9799function apc_define_constants (string $ key , array $ constants , bool $ case_sensitive = true ): void
98100{
99101 error_clear_last ();
100102 $ result = \apc_define_constants ($ key , $ constants , $ case_sensitive );
101103 if ($ result === FALSE ) {
102- throw Exceptions \ ApcException::createFromPhpError ();
104+ throw ApcException::createFromPhpError ();
103105 }
104106}
105107
@@ -114,15 +116,15 @@ function apc_define_constants(string $key, array $constants, bool $case_sensitiv
114116 * Or if keys is an array, then
115117 * an empty array is returned on success, or an array of failed files
116118 * is returned.
117- * @throws Exceptions\ ApcException
119+ * @throws ApcException
118120 *
119121 */
120122function apc_delete_file ($ keys )
121123{
122124 error_clear_last ();
123125 $ result = \apc_delete_file ($ keys );
124126 if ($ result === FALSE ) {
125- throw Exceptions \ ApcException::createFromPhpError ();
127+ throw ApcException::createFromPhpError ();
126128 }
127129 return $ result ;
128130}
@@ -133,15 +135,15 @@ function apc_delete_file($keys)
133135 *
134136 * @param string|string[]|APCIterator $key The key used to store the value (with
135137 * apc_store).
136- * @throws Exceptions\ ApcException
138+ * @throws ApcException
137139 *
138140 */
139141function apc_delete (string $ key )
140142{
141143 error_clear_last ();
142144 $ result = \apc_delete ($ key );
143145 if ($ result === FALSE ) {
144- throw Exceptions \ ApcException::createFromPhpError ();
146+ throw ApcException::createFromPhpError ();
145147 }
146148 return $ result ;
147149}
@@ -156,7 +158,7 @@ function apc_delete(string $key)
156158 * this referenced variable.
157159 * @return int Returns the current value of key's value on success,
158160 *
159- * @throws Exceptions\ ApcException
161+ * @throws ApcException
160162 *
161163 */
162164function 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
168170 $ result = \apc_inc ($ key , $ step );
169171 }
170172 if ($ result === FALSE ) {
171- throw Exceptions \ ApcException::createFromPhpError ();
173+ throw ApcException::createFromPhpError ();
172174 }
173175 return $ result ;
174176}
@@ -183,15 +185,15 @@ function apc_inc(string $key, int $step = 1, bool &$success = null): int
183185 * i.e. CONSTANT and Constant
184186 * represent different values. If this parameter evaluates to FALSE the
185187 * constants will be declared as case-insensitive symbols.
186- * @throws Exceptions\ ApcException
188+ * @throws ApcException
187189 *
188190 */
189191function apc_load_constants (string $ key , bool $ case_sensitive = true ): void
190192{
191193 error_clear_last ();
192194 $ result = \apc_load_constants ($ key , $ case_sensitive );
193195 if ($ result === FALSE ) {
194- throw Exceptions \ ApcException::createFromPhpError ();
196+ throw ApcException::createFromPhpError ();
195197 }
196198}
197199
0 commit comments