APCUIterator.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. /**
  3. * The APCUIterator class
  4. *
  5. * The APCUIterator class makes it easier to iterate over large APCu caches.
  6. * This is helpful as it allows iterating over large caches in steps, while grabbing a defined number
  7. * of entries per lock instance, so it frees the cache locks for other activities rather than hold up
  8. * the entire cache to grab 100 (the default) entries. Also, using regular expression matching is more
  9. * efficient as it's been moved to the C level.
  10. *
  11. * @link http://php.net/manual/en/class.apcuiterator.php
  12. * @since APCu 5.0.0
  13. */
  14. class APCUIterator implements Iterator {
  15. /**
  16. * Constructs an APCUIterator iterator object
  17. * @link http://php.net/manual/en/apcuiterator.construct.php
  18. * @param string|string[]|null $search A PCRE regular expression that matches against APCu key names,
  19. * either as a string for a single regular expression, or as an array of regular expressions.
  20. * Or, optionally pass in NULL to skip the search.
  21. * @param int $format The desired format, as configured with one ore more of the APC_ITER_* constants.
  22. * @param int $chunk_size The chunk size. Must be a value greater than 0. The default value is 100.
  23. * @param int $list The type to list. Either pass in APC_LIST_ACTIVE or APC_LIST_DELETED.
  24. */
  25. public function __construct($search = null, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE){}
  26. /**
  27. * Rewinds back the iterator to the first element
  28. * @link http://php.net/manual/en/apcuiterator.rewind.php
  29. */
  30. public function rewind(){}
  31. /**
  32. * Checks if the current iterator position is valid
  33. * @link http://php.net/manual/en/apcuiterator.valid.php
  34. * @return bool Returns TRUE if the current iterator position is valid, otherwise FALSE.
  35. */
  36. public function valid(){}
  37. /**
  38. * Gets the current item from the APCUIterator stack
  39. * @link http://php.net/manual/en/apcuiterator.current.php
  40. * @return mixed Returns the current item on success, or FALSE if no more items or exist, or on failure.
  41. */
  42. public function current(){}
  43. /**
  44. * Gets the current iterator key
  45. * @link http://php.net/manual/en/apcuiterator.key.php
  46. * @return string|int|bool Returns the key on success, or FALSE upon failure.
  47. */
  48. public function key(){}
  49. /**
  50. * Moves the iterator pointer to the next element
  51. * @link http://php.net/manual/en/apcuiterator.next.php
  52. * @return bool Returns TRUE on success or FALSE on failure.
  53. */
  54. public function next(){}
  55. /**
  56. * Gets the total number of cache hits
  57. * @link http://php.net/manual/en/apcuiterator.gettotalhits.php
  58. * @return int|bool The number of hits on success, or FALSE on failure.
  59. */
  60. public function getTotalHits(){}
  61. /**
  62. * Gets the total cache size
  63. * @link http://php.net/manual/en/apcuiterator.gettotalsize.php
  64. * @return int|bool The total cache size.
  65. */
  66. public function getTotalSize(){}
  67. /**
  68. * Get the total count
  69. * @link http://php.net/manual/en/apcuiterator.gettotalcount.php
  70. * @return int|bool The total count.
  71. */
  72. public function getTotalCount(){}
  73. }