class MongoDbProfilerStorage implements ProfilerStorageInterface

deprecated Deprecated since Symfony 2.8, to be removed in Symfony 3.0. Use {@link FileProfilerStorage} instead.

Properties

protected $dsn
protected $lifetime

Methods

__construct(string $dsn, string $username = '', string $password = '', int $lifetime = 86400)

No description

array
find(string $ip, string $url, string $limit, string $method, int|null $start = null, int|null $end = null)

Finds profiler tokens for the given criteria.

purge()

Purges all data from the database.

read(string $token)

Reads data associated with the given token.

bool
write(Profile $profile)

Saves a Profile.

MongoCollection
getMongo()

Internal convenience method that returns the instance of the MongoDB Collection.

createProfileFromData(array $data)

No description

readChildren(string $token)

No description

cleanup()

No description

Details

at line 32
__construct(string $dsn, string $username = '', string $password = '', int $lifetime = 86400)

Parameters

string $dsn A data source name
string $username Not used
string $password Not used
int $lifetime The lifetime to use for the purge

at line 41
array find(string $ip, string $url, string $limit, string $method, int|null $start = null, int|null $end = null)

Finds profiler tokens for the given criteria.

Parameters

string $ip The IP
string $url The URL
string $limit The maximum number of tokens to return
string $method The request method
int|null $start The start date to search from
int|null $end The end date to search to

Return Value

array An array of tokens

at line 56
purge()

Purges all data from the database.

at line 64
Profile read(string $token)

Reads data associated with the given token.

The method returns false if the token does not exist in the storage.

Parameters

string $token A token

Return Value

Profile The profile associated with token

at line 78
bool write(Profile $profile)

Saves a Profile.

Parameters

Profile $profile

Return Value

bool Write operation successful

at line 105
protected MongoCollection getMongo()

Internal convenience method that returns the instance of the MongoDB Collection.

Return Value

MongoCollection

Exceptions

RuntimeException

at line 125
protected Profile createProfileFromData(array $data)

Parameters

array $data

Return Value

Profile

at line 146
protected Profile[] readChildren(string $token)

Parameters

string $token

Return Value

Profile[] An array of Profile instances

at line 158
protected cleanup()