Function __global->call_compiled_code
Definitions
sources/global.php
- Require some code for use within the software (after we ran compile_included_code on it), prioritising _compiled files if they exist.Do not use this function directly; use require_code instead.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $path | string | No | No | required parameter | N/A | N/A | The file path to the original file (not the compiled one) |
| $codename | string | No | No | required parameter | N/A | N/A | The codename for the source module to load |
| $light_exit | boolean | No | No | required parameter | N/A | N/A | Whether to cleanly fail when an error occurs |
| $delete_compiled | ?boolean | No | No | False | N/A | N/A | Whether we should ignore, and delete, the _compiled file, if it exists (null: ignore only, and evaluate $code if not null) |
| $code | ?string | No | No | Null | N/A | N/A | If $delete_compiled is null, evaluate this code instead of loading in compiled code (null: no overridden code to evaluate; require in $path instead) |
Preview
Code (PHP)
/**
* Require some code for use within the software (after we ran compile_included_code on it), prioritising _compiled files if they exist.Do not use this function directly; use require_code instead.
*
* @param string $path The file path to the original file (not the compiled one)
* @param string $codename The codename for the source module to load
* @param boolean $light_exit Whether to cleanly fail when an error occurs
* @param ?boolean $delete_compiled Whether we should ignore, and delete, the _compiled file, if it exists (null: ignore only, and evaluate $code if not null)
* @param ?string $code If $delete_compiled is null, evaluate this code instead of loading in compiled code (null: no overridden code to evaluate; require in $path instead)
*/
function call_compiled_code(string $path, string $codename, bool $light_exit, ?bool $delete_compiled = false, ?string $code = null)
* Require some code for use within the software (after we ran compile_included_code on it), prioritising _compiled files if they exist.Do not use this function directly; use require_code instead.
*
* @param string $path The file path to the original file (not the compiled one)
* @param string $codename The codename for the source module to load
* @param boolean $light_exit Whether to cleanly fail when an error occurs
* @param ?boolean $delete_compiled Whether we should ignore, and delete, the _compiled file, if it exists (null: ignore only, and evaluate $code if not null)
* @param ?string $code If $delete_compiled is null, evaluate this code instead of loading in compiled code (null: no overridden code to evaluate; require in $path instead)
*/
function call_compiled_code(string $path, string $codename, bool $light_exit, ?bool $delete_compiled = false, ?string $code = null)

