菜谱项目

ProfilerStorageInterface.php 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\HttpKernel\Profiler;
  11. /**
  12. * ProfilerStorageInterface.
  13. *
  14. * @author Fabien Potencier <fabien@symfony.com>
  15. */
  16. interface ProfilerStorageInterface
  17. {
  18. /**
  19. * Finds profiler tokens for the given criteria.
  20. *
  21. * @param string $ip The IP
  22. * @param string $url The URL
  23. * @param string $limit The maximum number of tokens to return
  24. * @param string $method The request method
  25. * @param int|null $start The start date to search from
  26. * @param int|null $end The end date to search to
  27. *
  28. * @return array An array of tokens
  29. */
  30. public function find($ip, $url, $limit, $method, $start = null, $end = null);
  31. /**
  32. * Reads data associated with the given token.
  33. *
  34. * The method returns false if the token does not exist in the storage.
  35. *
  36. * @param string $token A token
  37. *
  38. * @return Profile The profile associated with token
  39. */
  40. public function read($token);
  41. /**
  42. * Saves a Profile.
  43. *
  44. * @return bool Write operation successful
  45. */
  46. public function write(Profile $profile);
  47. /**
  48. * Purges all data from the database.
  49. */
  50. public function purge();
  51. }