FileAccess Orion

FileProfilerStorage
in package
implements ProfilerStorageInterface

Storage for profiler using files.

Tags
author

Alexandre Salomé alexandre.salome@gmail.com

Interfaces, Classes, Traits and Enums

ProfilerStorageInterface

Table of Contents

$folder  : string
Folder where profiler data are stored.
__construct()  : mixed
Constructs the file storage using a "dsn-like" path.
find()  : array<string|int, mixed>
{@inheritdoc}
purge()  : mixed
{@inheritdoc}
read()  : Profile|null
{@inheritdoc}
write()  : bool
{@inheritdoc}
createProfileFromData()  : mixed
getFilename()  : string
Gets filename to store data, associated to the token.
getIndexFilename()  : string
Gets the index filename.
readLineFromFile()  : mixed
Reads a line in the file, backward.

Properties

Methods

__construct()

Constructs the file storage using a "dsn-like" path.

public __construct(string $dsn) : mixed

Example : "file:/path/to/the/storage/folder"

Parameters
$dsn : string
Tags
throws
RuntimeException
Return values
mixed

find()

{@inheritdoc}

public find(mixed $ip, mixed $url, mixed $limit, mixed $method[, mixed $start = null ][, mixed $end = null ][, mixed $statusCode = null ]) : array<string|int, mixed>
Parameters
$ip : mixed
$url : mixed
$limit : mixed
$method : mixed
$start : mixed = null
$end : mixed = null
$statusCode : mixed = null
Return values
array<string|int, mixed>

createProfileFromData()

protected createProfileFromData(mixed $token, mixed $data[, mixed $parent = null ]) : mixed
Parameters
$token : mixed
$data : mixed
$parent : mixed = null
Return values
mixed

getFilename()

Gets filename to store data, associated to the token.

protected getFilename(string $token) : string
Parameters
$token : string
Return values
string

The profile filename

getIndexFilename()

Gets the index filename.

protected getIndexFilename() : string
Return values
string

The index filename

readLineFromFile()

Reads a line in the file, backward.

protected readLineFromFile(resource $file) : mixed

This function automatically skips the empty lines and do not include the line return in result value.

Parameters
$file : resource

The file resource, with the pointer placed at the end of the line to read

Return values
mixed

A string representing the line or null if beginning of file is reached

Search results