Documentation

MemoryDataCollector extends DataCollector
in package
implements LateDataCollectorInterface

MemoryDataCollector.

Tags
author

Fabien Potencier fabien@symfony.com

Interfaces, Classes and Traits

LateDataCollectorInterface
LateDataCollectorInterface.

Table of Contents

$data  : array<string|int, mixed>|Data
$cloner  : ClonerInterface
$valueExporter  : ValueExporter
__construct()  : mixed
collect()  : mixed
{@inheritdoc}
getMemory()  : int
Gets the memory.
getMemoryLimit()  : int
Gets the PHP memory limit.
getName()  : mixed
{@inheritdoc}
lateCollect()  : mixed
Collects data as late as possible.
reset()  : mixed
{@inheritdoc}
serialize()  : mixed
unserialize()  : mixed
updateMemoryUsage()  : mixed
Updates the memory usage data.
cloneVar()  : Data
Converts the variable into a serializable Data instance.
getCasters()  : array<string|int, callable>
varToString()  : string
Converts a PHP variable to a string.
convertToBytes()  : mixed

Properties

Methods

getMemory()

Gets the memory.

public getMemory() : int
Return values
int

The memory

getMemoryLimit()

Gets the PHP memory limit.

public getMemoryLimit() : int
Return values
int

The memory limit

lateCollect()

Collects data as late as possible.

public lateCollect() : mixed
Return values
mixed

serialize()

public serialize() : mixed
Return values
mixed

unserialize()

public unserialize(mixed $data) : mixed
Parameters
$data : mixed
Return values
mixed

updateMemoryUsage()

Updates the memory usage data.

public updateMemoryUsage() : mixed
Return values
mixed

cloneVar()

Converts the variable into a serializable Data instance.

protected cloneVar(mixed $var) : Data

This array can be displayed in the template using the VarDumper component.

Parameters
$var : mixed
Return values
Data

getCasters()

protected getCasters() : array<string|int, callable>
Return values
array<string|int, callable>

The casters to add to the cloner

varToString()

Converts a PHP variable to a string.

protected varToString(mixed $var) : string
Parameters
$var : mixed

A PHP variable

Tags
deprecated

since version 3.2, to be removed in 4.0. Use cloneVar() instead.

Return values
string

The string representation of the variable

convertToBytes()

private convertToBytes(mixed $memoryLimit) : mixed
Parameters
$memoryLimit : mixed
Return values
mixed

Search results