PageRenderTime 52ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 1ms

/src/Bartlett/CompatInfo/Reference/Extension/ApcExtension.php

http://github.com/llaville/php-compat-info
PHP | 290 lines | 262 code | 20 blank | 8 comment | 8 complexity | c372dd0c839ba57fd5c83b7a61d7b72d MD5 | raw file
Possible License(s): BSD-3-Clause
  1. <?php
  2. namespace Bartlett\CompatInfo\Reference\Extension;
  3. use Bartlett\CompatInfo\Reference\AbstractReference;
  4. class ApcExtension extends AbstractReference
  5. {
  6. const REF_NAME = 'apc';
  7. const REF_VERSION = '3.1.13'; // 2012-09-03 (beta)
  8. public function __construct()
  9. {
  10. parent::__construct(self::REF_NAME, self::REF_VERSION);
  11. $version = $this->getCurrentVersion();
  12. $releases = array();
  13. // 2.0.0
  14. if (version_compare($version, '2.0.0', 'ge')) {
  15. $release = $this->getR20000();
  16. $count = array_push($releases, $release);
  17. $this->storage->attach($releases[--$count]);
  18. }
  19. // 3.0.0
  20. if (version_compare($version, '3.0.0', 'ge')) {
  21. $release = $this->getR30000();
  22. $count = array_push($releases, $release);
  23. $this->storage->attach($releases[--$count]);
  24. }
  25. // 3.0.11
  26. if (version_compare($version, '3.0.11', 'ge')) {
  27. $release = $this->getR30011();
  28. $count = array_push($releases, $release);
  29. $this->storage->attach($releases[--$count]);
  30. }
  31. // 3.0.13
  32. if (version_compare($version, '3.0.13', 'ge')) {
  33. $release = $this->getR30013();
  34. $count = array_push($releases, $release);
  35. $this->storage->attach($releases[--$count]);
  36. }
  37. // 3.0.19
  38. if (version_compare($version, '3.0.19', 'ge')) {
  39. $release = $this->getR30019();
  40. $count = array_push($releases, $release);
  41. $this->storage->attach($releases[--$count]);
  42. }
  43. // 3.1.1
  44. if (version_compare($version, '3.1.1', 'ge')) {
  45. $release = $this->getR30101();
  46. $count = array_push($releases, $release);
  47. $this->storage->attach($releases[--$count]);
  48. }
  49. // 3.1.4
  50. if (version_compare($version, '3.1.4', 'ge')) {
  51. $release = $this->getR30104();
  52. $count = array_push($releases, $release);
  53. $this->storage->attach($releases[--$count]);
  54. }
  55. // 3.1.12
  56. if (version_compare($version, '3.1.12', 'ge')) {
  57. $release = $this->getR30112();
  58. $count = array_push($releases, $release);
  59. $this->storage->attach($releases[--$count]);
  60. }
  61. }
  62. protected function getR20000()
  63. {
  64. $release = new \stdClass;
  65. $release->info = array(
  66. 'ext.min' => '2.0.0',
  67. 'ext.max' => '',
  68. 'state' => 'stable',
  69. 'date' => '2003-07-01',
  70. 'php.min' => '4.0.0',
  71. 'php.max' => '',
  72. );
  73. $release->iniEntries = array(
  74. 'apc.enabled' => null,
  75. 'apc.filters' => null,
  76. 'apc.gc_ttl' => null,
  77. 'apc.mmap_file_mask' => null,
  78. 'apc.num_files_hint' => null,
  79. 'apc.optimization' => null,
  80. 'apc.shm_segments' => null,
  81. 'apc.shm_size' => null,
  82. );
  83. $release->functions = array(
  84. 'apc_cache_info' => null,
  85. 'apc_clear_cache' => null,
  86. 'apc_sma_info' => null,
  87. );
  88. return $release;
  89. }
  90. protected function getR30000()
  91. {
  92. $release = new \stdClass;
  93. $release->info = array(
  94. 'ext.min' => '3.0.0',
  95. 'ext.max' => '',
  96. 'state' => 'stable',
  97. 'date' => '2005-07-05',
  98. 'php.min' => '4.3.0',
  99. 'php.max' => '',
  100. );
  101. $release->iniEntries = array(
  102. 'apc.cache_by_default' => null,
  103. 'apc.slam_defense' => null,
  104. 'apc.ttl' => null,
  105. 'apc.user_entries_hint' => null,
  106. 'apc.user_ttl' => null,
  107. );
  108. $release->functions = array(
  109. 'apc_define_constants' => null,
  110. 'apc_delete' => null,
  111. 'apc_fetch' => null,
  112. 'apc_load_constants' => null,
  113. 'apc_store' => null,
  114. );
  115. return $release;
  116. }
  117. protected function getR30011()
  118. {
  119. $release = new \stdClass;
  120. $release->info = array(
  121. 'ext.min' => '3.0.11',
  122. 'ext.max' => '',
  123. 'state' => 'stable',
  124. 'date' => '2006-08-17',
  125. 'php.min' => '4.3.0',
  126. 'php.max' => '',
  127. );
  128. $release->iniEntries = array(
  129. 'apc.enable_cli' => null,
  130. 'apc.file_update_protection' => null,
  131. 'apc.max_file_size' => null,
  132. 'apc.report_autofilter' => null,
  133. 'apc.stat' => null,
  134. 'apc.write_lock' => null,
  135. );
  136. return $release;
  137. }
  138. protected function getR30013()
  139. {
  140. $release = new \stdClass;
  141. $release->info = array(
  142. 'ext.min' => '3.0.13',
  143. 'ext.max' => '',
  144. 'state' => 'stable',
  145. 'date' => '2007-02-24',
  146. 'php.min' => '4.3.0',
  147. 'php.max' => '',
  148. );
  149. $release->functions = array(
  150. 'apc_add' => null,
  151. 'apc_compile_file' => null,
  152. );
  153. return $release;
  154. }
  155. protected function getR30019()
  156. {
  157. $release = new \stdClass;
  158. $release->info = array(
  159. 'ext.min' => '3.0.19',
  160. 'ext.max' => '',
  161. 'state' => 'stable',
  162. 'date' => '2008-05-15',
  163. 'php.min' => '4.3.0',
  164. 'php.max' => '',
  165. );
  166. $release->iniEntries = array(
  167. 'apc.coredump_unmap' => null,
  168. 'apc.include_once_override' => null,
  169. 'apc.rfc1867' => null,
  170. 'apc.rfc1867_prefix' => null,
  171. 'apc.rfc1867_name' => null,
  172. 'apc.rfc1867_freq' => null,
  173. 'apc.stat_ctime' => null,
  174. );
  175. return $release;
  176. }
  177. protected function getR30101()
  178. {
  179. $release = new \stdClass;
  180. $release->info = array(
  181. 'ext.min' => '3.1.1',
  182. 'ext.max' => '',
  183. 'state' => 'beta',
  184. 'date' => '2008-12-12',
  185. 'php.min' => '5.1.0',
  186. 'php.max' => '',
  187. );
  188. $release->iniEntries = array(
  189. 'apc.canonicalize' => null,
  190. 'apc.file_md5' => null,
  191. 'apc.rfc1867_ttl' => null,
  192. 'apc.preload_path' => null,
  193. );
  194. $release->functions = array(
  195. 'apc_cas' => null,
  196. 'apc_dec' => null,
  197. 'apc_delete_file' => null,
  198. 'apc_inc' => null,
  199. );
  200. $release->classes = array(
  201. 'APCIterator' => null
  202. );
  203. $release->constants = array(
  204. 'APC_ITER_ALL' => null,
  205. 'APC_ITER_ATIME' => null,
  206. 'APC_ITER_CTIME' => null,
  207. 'APC_ITER_DEVICE' => null,
  208. 'APC_ITER_DTIME' => null,
  209. 'APC_ITER_FILENAME' => null,
  210. 'APC_ITER_INODE' => null,
  211. 'APC_ITER_KEY' => null,
  212. 'APC_ITER_MD5' => null,
  213. 'APC_ITER_MEM_SIZE' => null,
  214. 'APC_ITER_MTIME' => null,
  215. 'APC_ITER_NONE' => null,
  216. 'APC_ITER_NUM_HITS' => null,
  217. 'APC_ITER_REFCOUNT' => null,
  218. 'APC_ITER_TTL' => null,
  219. 'APC_ITER_TYPE' => null,
  220. 'APC_ITER_VALUE' => null,
  221. 'APC_LIST_ACTIVE' => null,
  222. 'APC_LIST_DELETED' => null,
  223. );
  224. return $release;
  225. }
  226. protected function getR30104()
  227. {
  228. $release = new \stdClass;
  229. $release->info = array(
  230. 'ext.min' => '3.1.4',
  231. 'ext.max' => '',
  232. 'state' => 'beta',
  233. 'date' => '2008-12-12',
  234. 'php.min' => '5.1.0',
  235. 'php.max' => '',
  236. );
  237. $release->constants = array(
  238. 'APC_BIN_VERIFY_MD5' => null,
  239. 'APC_BIN_VERIFY_CRC32' => null,
  240. );
  241. $release->functions = array(
  242. 'apc_bin_dump' => null,
  243. 'apc_bin_dumpfile' => null,
  244. 'apc_bin_load' => null,
  245. 'apc_bin_loadfile' => null,
  246. 'apc_exists' => null,
  247. );
  248. return $release;
  249. }
  250. protected function getR30112()
  251. {
  252. $release = new \stdClass;
  253. $release->info = array(
  254. 'ext.min' => '3.1.12',
  255. 'ext.max' => '',
  256. 'state' => 'beta',
  257. 'date' => '2008-12-12',
  258. 'php.min' => '5.1.0',
  259. 'php.max' => '',
  260. );
  261. $release->iniEntries = array(
  262. 'apc.lazy_classes' => null,
  263. 'apc.lazy_functions' => null,
  264. 'apc.serializer' => null,
  265. 'apc.shm_strings_buffer' => null,
  266. 'apc.use_request_time' => null,
  267. );
  268. return $release;
  269. }
  270. }