wms7-common.php

Description: Helper Console Build Feature.

PHP version 8.0.1

Functions

wms7_console_error_handler()

wms7_console_error_handler(integer  $errno, string  $errorstr) 

Console error handler.

Parameters

integer $errno

Number of error.

string $errorstr

Message of error.

wms7_console_error()

wms7_console_error(string  $error) 

Error output in json format.

Parameters

string $error

Message of error.

wms7_save_variables()

wms7_save_variables(array  $existing, array  $current, array  $ignore) 

Saves newly defined variables to session.

Parameters

array $existing

existing.

array $current

current.

array $ignore

ignore.

wms7_class_set_state_check()

wms7_class_set_state_check(object  $matches) : \object.

Classes to be restored need to implement __set_state() function.

If they don't have it, we will convert to stdClass object.

Parameters

object $matches

Matches.

Returns

\object.

wms7_parse_code()

wms7_parse_code(object  $code) : \integer.

See: http://jan.kneschke.de/projects/php-shell Return int 0 if a executable statement is in the session buffer, non-zero otherwise.

Parameters

object $code

Code for parse.

Throws

\Exception

Variable \'%s\' is not set.

\Exception

Variable \'%s\' is not a class.

\Exception

Variable %s (Class '%s') doesn't have a method named '%s'.

\Exception

Variable \'%s\' is not set.

\Exception

Variable \'%s\' is not a class.

\Exception

Variable %s (Class '%s') doesn't have a method named '%s'.

\Exception

Variable \'%s\' is not a array'.

\Exception

Class \'%s\' doesn\'t exist.

\Exception

Class '%s' doesn't have a method named '%s'.

Returns

\integer.