Constructor function. Starts command parsing on the supplied command.
virtual_bash
virtual_bash
(string $inputted_command, [?array $prior_output = NULL], [?array $parameters = NULL])
-
string
$inputted_command: The inputted command, unparsed
-
?array
$prior_output: An array of prior output to be prepended (NULL: none)
-
?array
$parameters: An array of prior parameters (NULL: none)
Return the HTML rendering of the parsed command's output.
~tempcode
output_html
([boolean $blank_ok = false])
-
boolean
$blank_ok: Whether it is okay to have blank output
Output an XML-RPC packet (hopefully) to the AJAX in the frontend.
boolean
output_xml
()
Parses input setup in constructor, and creates a parse tree.
void
parse_input
()
Returns the output for the command just parsed.
~array
return_output
()
Returns the parse tree for the command just parsed.
~array
return_parse_tree
()
Convert an array to tempcode for display.
tempcode
_array_to_html
(array $array)
-
array
$array: Array to display
Convert an array to text for display.
string
_array_to_text
(array $array, [integer $indentation = 0])
-
array
$array: Array to display
-
integer
$indentation: Global indentation
Is the current block a valid redirection instruction?
boolean
_check_is_redirection
()
Combine two streams regardless of their format.
array
_combine_streams
(array $stream1, array $stream2)
-
array
$stream1: Stream 1
-
array
$stream2: Stream 2
Return a specified number of tabs.
string
_do_indentation
(integer $indentation)
-
integer
$indentation: Number of tabs to return
Extract the command name from the input.
void
_extract_command
()
Extract extra tokens from the input.
void
_extract_extras
()
Extract options (switches) from the input.
void
_extract_options
()
Extract parameters from the input.
void
_extract_parameters
()
Find a script file.
~string
_find_script_file
(string $script_name, [?string $dir = NULL])
-
string
$script_name: Script name
-
?string
$dir: Directory (NULL: OcCLE module data dir)
Handle a PHP command by executing it, dealing with variables from the class.
void
_handle_php_command
()