Function __global->extract_module_functions
Definitions
sources/zones.php
- Extract code to execute the requested functions with the requested parameters from the module at the given path.We used to actually load up the module, but it ate all our RAM when we did!
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $path | PATH | No | No | required parameter | N/A | N/A | The path to the module (or any PHP file with a class) |
| $functions | array | No | No | required parameter | N/A | N/A | Array of functions to be executing |
| $params | array | No | No | [] | N/A | N/A | A list of parameters to pass to our functions |
| $prefer_direct_code_call | boolean | No | No | False | N/A | N/A | Whether to do this "properly" (via proper OOP), which will consume more memory; it may have to recurse and do this anyway if it sees references to a parent class |
| $class_name | ?string | No | No | Null | N/A | N/A | Class name to use (null: autodetect, which is a little slower) |
Returns
- A list of pieces of code to do the equivalent of executing the requested functions with the requested parameters
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Extract code to execute the requested functions with the requested parameters from the module at the given path.We used to actually load up the module, but it ate all our RAM when we did!
*
* @param PATH $path The path to the module (or any PHP file with a class)
* @param array $functions Array of functions to be executing
* @param array $params A list of parameters to pass to our functions
* @param boolean $prefer_direct_code_call Whether to do this "properly" (via proper OOP), which will consume more memory; it may have to recurse and do this anyway if it sees references to a parent class
* @param ?string $class_name Class name to use (null: autodetect, which is a little slower)
* @return array A list of pieces of code to do the equivalent of executing the requested functions with the requested parameters
*/
function extract_module_functions(string $path, array $functions, array $params = [], bool $prefer_direct_code_call = false, ?string $class_name = null) : array
* Extract code to execute the requested functions with the requested parameters from the module at the given path.We used to actually load up the module, but it ate all our RAM when we did!
*
* @param PATH $path The path to the module (or any PHP file with a class)
* @param array $functions Array of functions to be executing
* @param array $params A list of parameters to pass to our functions
* @param boolean $prefer_direct_code_call Whether to do this "properly" (via proper OOP), which will consume more memory; it may have to recurse and do this anyway if it sees references to a parent class
* @param ?string $class_name Class name to use (null: autodetect, which is a little slower)
* @return array A list of pieces of code to do the equivalent of executing the requested functions with the requested parameters
*/
function extract_module_functions(string $path, array $functions, array $params = [], bool $prefer_direct_code_call = false, ?string $class_name = null) : array

