check_function_type (line 458)
Type-check the specified parameter (giving an error if the type checking fails) [all checks]
void
check_function_type
(ID_TEXT $type, string $function_name, string $name, ?mixed $value, ?string $range, ?string $set, [boolean $echo = false])
-
ID_TEXT
$type: The parameter type
-
string
$function_name: The functions name (used in error message)
-
string
$name: The parameter name (used in error message)
-
?mixed
$value: The parameters value (NULL: value actually is null)
-
?string
$range: The string of value range of the parameter (NULL: no range constraint)
-
?string
$set: The string of value set limitation for the parameter (NULL: no set constraint)
-
boolean
$echo: Whether we just echo errors instead of exiting
get_php_file_api (line 52)
Get a complex API information structure from a PHP file. It assumes the file has reasonably properly layed out class and function whitespace The return structure is...
list of classes each entry is a map containing 'functions' (list of functions) and 'name' each functions entry is a map containing 'parameters' and 'name' and 'return' each parameters entry is a map containing... name description type default set range
array
get_php_file_api
(ID_TEXT $filename, [boolean $include_code = true])
-
ID_TEXT
$filename: The PHP code module to get API information for
-
boolean
$include_code: Whether to include function source code
init__php (line 28)
Standard code module initialisation function.
void
init__php
()
render_php_function (line 692)
Render a PHP function to display in a template.
array
render_php_function
(array $function, array $class, [boolean $show_filename = false])
-
array
$function: The map of function information
-
array
$class: The map of class information
-
boolean
$show_filename: Show filenames in the function description
render_php_function_do_bits (line 755)
Get a PHP function parameter line.
tempcode
render_php_function_do_bits
(array $parameter)
-
array
$parameter: A map containing: name, description, default, type, set, range
test_fail_php_type_check (line 568)
Type-check the specified parameter (giving an error if the type checking fails) [just value against type]
void
test_fail_php_type_check
(ID_TEXT $type, string $function_name, string $name, mixed $value, [boolean $echo = false])
-
ID_TEXT
$type: The parameter type
-
string
$function_name: The functions name (used in error message)
-
string
$name: The parameter name (used in error message)
-
mixed
$value: The parameters value (cannot be null)
-
boolean
$echo: Whether we just echo errors instead of exiting
_cleanup_array (line 437)
Remove and blank strings from the given array.
array
_cleanup_array
(array $in)
-
array
$in: List of strings
_fail_php_type_check (line 676)
Throw out a type checker error message.
void
_fail_php_type_check
(string $type, string $function_name, string $name, string $value, [boolean $echo = false])
-
string
$type: The type involved
-
string
$function_name: The function involved
-
string
$name: The parameter name involved
-
string
$value: The value involved
-
boolean
$echo: Whether we just echo errors instead of exiting
_read_php_function_line (line 316)
Read a PHP function line and return parsed details.
array
_read_php_function_line
(string $_line)