ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
◀ ilDoc Overview
PHPMemoryLimit.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\ResourceStorage\Flavour\Engine
;
22
27
trait
PHPMemoryLimit
28
{
29
public
function
getSizeLimitInBytes():
int
30
{
31
$memory_limit = ini_get(
'memory_limit'
);
32
if
(preg_match(
'/^(\d+)(.)$/'
, $memory_limit, $matches)) {
33
$memory_limit = match ($matches[2]) {
34
'K'
=> $matches[1] * 1024,
35
'M'
=> $matches[1] * 1024 * 1024,
36
'G'
=> $matches[1] * 1024 * 1024 * 1024,
37
default
=> $memory_limit,
38
};
39
}
40
return
(
int
) $memory_limit;
41
}
42
}
ILIAS\ResourceStorage\Flavour\Engine
Definition:
DefaultEngines.php:21
PHPMemoryLimit
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
components
ILIAS
ResourceStorage
src
Flavour
Engine
PHPMemoryLimit.php
Generated on Wed Sep 3 2025 23:03:43 for ILIAS by
1.8.13 (using
Doxyfile
)