2010-08-28 14:23:21 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
2011-01-15 13:29:43 +00:00
|
|
|
* This file is part of the Symfony package.
|
2010-08-28 14:23:21 +01:00
|
|
|
*
|
2011-03-06 11:40:06 +00:00
|
|
|
* (c) Fabien Potencier <fabien@symfony.com>
|
2010-08-28 14:23:21 +01:00
|
|
|
*
|
2011-01-15 13:29:43 +00:00
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
2010-08-28 14:23:21 +01:00
|
|
|
*/
|
|
|
|
|
2011-01-15 13:29:43 +00:00
|
|
|
namespace Symfony\Component\HttpKernel\Profiler;
|
|
|
|
|
2010-08-28 14:23:21 +01:00
|
|
|
/**
|
|
|
|
* ProfilerStorageInterface.
|
|
|
|
*
|
2011-03-06 11:40:06 +00:00
|
|
|
* @author Fabien Potencier <fabien@symfony.com>
|
2010-08-28 14:23:21 +01:00
|
|
|
*/
|
|
|
|
interface ProfilerStorageInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Finds profiler tokens for the given criteria.
|
|
|
|
*
|
|
|
|
* @param string $ip The IP
|
|
|
|
* @param string $url The URL
|
|
|
|
* @param string $limit The maximum number of tokens to return
|
|
|
|
*
|
|
|
|
* @return array An array of tokens
|
|
|
|
*/
|
|
|
|
function find($ip, $url, $limit);
|
|
|
|
|
2011-02-26 16:24:02 +00:00
|
|
|
/**
|
|
|
|
* Finds profiler tokens for the given parent token.
|
|
|
|
*
|
|
|
|
* @param string $token The parent token
|
|
|
|
*
|
|
|
|
* @return array An array of tokens
|
|
|
|
*/
|
|
|
|
function findChildren($token);
|
|
|
|
|
2010-08-28 14:23:21 +01:00
|
|
|
/**
|
|
|
|
* Reads data associated with the given token.
|
|
|
|
*
|
|
|
|
* The method returns false if the token does not exists in the storage.
|
|
|
|
*
|
|
|
|
* @param string $token A token
|
|
|
|
*
|
2010-08-30 15:04:50 +01:00
|
|
|
* @return string The data associated with token
|
2010-08-28 14:23:21 +01:00
|
|
|
*/
|
|
|
|
function read($token);
|
|
|
|
|
|
|
|
/**
|
2011-01-18 14:41:19 +00:00
|
|
|
* Write data associated with the given token.
|
2010-08-28 14:23:21 +01:00
|
|
|
*
|
2011-02-19 13:29:52 +00:00
|
|
|
* @param string $token A token
|
|
|
|
* @param string $parent The parent token
|
|
|
|
* @param string $data The data associated with token
|
|
|
|
* @param string $ip An IP
|
|
|
|
* @param string $url An URL
|
|
|
|
* @param integer $time The time of the data
|
2011-01-18 14:41:19 +00:00
|
|
|
*
|
|
|
|
* @return Boolean Write operation successful
|
2010-08-28 14:23:21 +01:00
|
|
|
*/
|
2011-02-19 13:29:52 +00:00
|
|
|
function write($token, $parent, $data, $ip, $url, $time);
|
2010-09-01 07:21:38 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Purges all data from the database.
|
|
|
|
*/
|
|
|
|
function purge();
|
2010-08-28 14:23:21 +01:00
|
|
|
}
|