API / Minn\Runtime / Constants

Constants final class

Minn\Runtime\Constants · public/minn/src/Minn/Runtime/Constants.php · 115 lines

The constants plugin code expects: the fixed set from data/constants.json (captured from the reference) and the per-site ones computed here. Nothing already defined is touched, so wp-config.php keeps the last word.

Used by 1

Constants and properties

privateINITIAL = array ( 0 => 'WPINC', 1 => 'KB_IN_BYTES', 2 => 'MB_IN_BYTES', 3 => 'GB_IN_BYTES', 4 => 'TB_IN_BYTES', 5 => 'PB_IN_BYTES', 6 => 'EB_IN_BYTES', 7 => 'ZB_IN_BYTES', 8 => 'YB_IN_BYTES', 9 => 'MEDIA_TRASH', 10 => 'WP_FEATURE_BETTER_PASSWORDS', 11 => 'MINUTE_IN_SECONDS', 12 => 'HOUR_IN_SECONDS', 13 => 'DAY_IN_SECONDS', 14 => 'WEEK_IN_SECONDS', 15 => 'MONTH_IN_SECONDS', 16 => 'YEAR_IN_SECONDS', )

The fixed constants the reference has defined before a page cache's advanced-cache.php runs.

Public

staticinitial(string $absPath, string $engineDir): void#

The constants the reference defines first (wp_initial_constants), before a page cache's advanced-cache.php runs: the units, the content folder, the memory limits and the debug and cache switches, wherever wp-config.php left one undefined.

staticdefine(Minn\Runtime\Runtime $runtime): void#

Defines the constants the reference defines at boot.

Internals 1

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privatemaxMemoryLimit(): string#

256M, unless PHP starts with no limit or a higher one, which is then kept as written (probe: the reference started at 128M, 300M, 1G, -1).