\ExteonMemoryHelper

This helper class is used to perform some common PHP memory management operations

Summary

Methods
Properties
Constants
getMemoryLimit()
increaseMemoryLimit()
setMemoryLimit()
doWithIncreasedMemory()
bytesFromPhpIniString()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getMemoryLimit()

getMemoryLimit() : integer

Gets the current memory limit, in bytes

Returns

integer

increaseMemoryLimit()

increaseMemoryLimit(string  $amount) 

Increases memory limit by the specified amount

Parameters

string $amount

setMemoryLimit()

setMemoryLimit(string  $amount) 

Sets the memory limit for the PHP script

Parameters

string $amount

doWithIncreasedMemory()

doWithIncreasedMemory(string  $amount, callable  $callback) : mixed

Runs the supplied callback with an increased memory limit

Parameters

string $amount
callable $callback

Returns

mixed

bytesFromPhpIniString()

bytesFromPhpIniString(string  $val) : integer

Parses the value in Php .ini memory size format (i.e. '100M') into the numeric byte size

Parameters

string $val

Returns

integer