1 | <?php |
||
17 | class OpcacheProxy implements ProxyInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var AbstractAdapter |
||
21 | */ |
||
22 | protected $adapter; |
||
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | */ |
||
27 | 15 | public function getFunctions() |
|
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | 15 | public function setAdapter(AbstractAdapter $adapter) |
|
47 | |||
48 | /** |
||
49 | * Compiles and caches a PHP script without executing it |
||
50 | * |
||
51 | * This function compiles a PHP script and adds it to the opcode cache without executing it. This can be used to |
||
52 | * prime the cache after a Web server restart by pre-caching files that will be included in later requests. |
||
53 | * |
||
54 | * @since 5.5.5 |
||
55 | * @since 7.0.2 |
||
56 | * @param string $file The path to the PHP script to be compiled. |
||
57 | * @return boolean Returns TRUE if file was compiled successfully or FALSE on failure. |
||
58 | */ |
||
59 | 1 | public function opcache_compile_file($file) |
|
69 | |||
70 | /** |
||
71 | * Get configuration information about the cache |
||
72 | * |
||
73 | * @since 5.5.5 |
||
74 | * @since 7.0.2 |
||
75 | * @return array Returns an array of information, including ini, blacklist and version |
||
76 | */ |
||
77 | 2 | public function opcache_get_configuration() |
|
84 | |||
85 | /** |
||
86 | * Get status information about the cache |
||
87 | * |
||
88 | * @since 5.5.5 |
||
89 | * @since 7.0.2 |
||
90 | * @param boolean $get_scripts Include script specific state information |
||
91 | * @return array Returns an array of information, optionally containing script specific state |
||
92 | * information |
||
93 | */ |
||
94 | 3 | public function opcache_get_status($get_scripts = true) |
|
104 | |||
105 | /** |
||
106 | * Get status information about the cache |
||
107 | * |
||
108 | * @since 5.5.0 |
||
109 | * @since 7.0.0 |
||
110 | * @param string $script The path to the script being invalidated. |
||
111 | * @param boolean $force If set to TRUE, the script will be invalidated regardless of whether invalidation is |
||
112 | * necessary. |
||
113 | * @return boolean Returns TRUE if the opcode cache for script was invalidated or if there was nothing to |
||
114 | * invalidate, or FALSE if the opcode cache is disabled. |
||
115 | */ |
||
116 | 1 | public function opcache_invalidate($script, $force = false) |
|
127 | |||
128 | /** |
||
129 | * Resets the contents of the opcode cache |
||
130 | * |
||
131 | * @since 5.5.0 |
||
132 | * @since 7.0.0 |
||
133 | * @return boolean Returns TRUE if the opcode cache was reset, or FALSE if the opcode cache is disabled. |
||
134 | */ |
||
135 | 2 | public function opcache_reset() |
|
145 | |||
146 | /** |
||
147 | * @return string |
||
148 | */ |
||
149 | 1 | public function opcache_version() |
|
156 | } |
||
157 |