| 148 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/*
|
|
|
4 |
* This file is part of the Symfony package.
|
|
|
5 |
*
|
|
|
6 |
* (c) Fabien Potencier <fabien@symfony.com>
|
|
|
7 |
*
|
|
|
8 |
* For the full copyright and license information, please view the LICENSE
|
|
|
9 |
* file that was distributed with this source code.
|
|
|
10 |
*/
|
|
|
11 |
|
|
|
12 |
namespace Symfony\Component\HttpKernel\Profiler;
|
|
|
13 |
|
|
|
14 |
/**
|
|
|
15 |
* ProfilerStorageInterface.
|
|
|
16 |
*
|
|
|
17 |
* This interface exists for historical reasons. The only supported
|
|
|
18 |
* implementation is FileProfilerStorage.
|
|
|
19 |
*
|
|
|
20 |
* As the profiler must only be used on non-production servers, the file storage
|
|
|
21 |
* is more than enough and no other implementations will ever be supported.
|
|
|
22 |
*
|
|
|
23 |
* @internal
|
|
|
24 |
*
|
|
|
25 |
* @author Fabien Potencier <fabien@symfony.com>
|
|
|
26 |
*/
|
|
|
27 |
interface ProfilerStorageInterface
|
|
|
28 |
{
|
|
|
29 |
/**
|
|
|
30 |
* Finds profiler tokens for the given criteria.
|
|
|
31 |
*
|
|
|
32 |
* @param int|null $limit The maximum number of tokens to return
|
|
|
33 |
* @param int|null $start The start date to search from
|
|
|
34 |
* @param int|null $end The end date to search to
|
|
|
35 |
*/
|
|
|
36 |
public function find(?string $ip, ?string $url, ?int $limit, ?string $method, int $start = null, int $end = null): array;
|
|
|
37 |
|
|
|
38 |
/**
|
|
|
39 |
* Reads data associated with the given token.
|
|
|
40 |
*
|
|
|
41 |
* The method returns false if the token does not exist in the storage.
|
|
|
42 |
*/
|
|
|
43 |
public function read(string $token): ?Profile;
|
|
|
44 |
|
|
|
45 |
/**
|
|
|
46 |
* Saves a Profile.
|
|
|
47 |
*/
|
|
|
48 |
public function write(Profile $profile): bool;
|
|
|
49 |
|
|
|
50 |
/**
|
|
|
51 |
* Purges all data from the database.
|
|
|
52 |
*/
|
|
|
53 |
public function purge();
|
|
|
54 |
}
|