Repository navigation
Expand file tree
/
Copy pathVariables.d.ts
More file actions
93 lines (93 loc) · 5.23 KB
/
Copy pathVariables.d.ts
File metadata and controls
93 lines (93 loc) · 5.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import type { PHPEngine } from "../PHPEngine.js";
import type { PHPContext } from "../PHPContext.js";
import { PHPReference } from "./PHPVariable.js";
export declare function isPlainObject(value: any): boolean;
export declare class VariablesRuntime {
/**
* Serializes a value into a PHP-compatible serialized string representation.
*/
static serialize(ctx: PHPContext | null, valueArg?: PHPReference): Promise<string>;
/**
* Dumps information about one or more variables.
*/
static var_dump(ctx: any, ...args: PHPReference[]): Promise<void>;
/**
* Prints human-readable information about a variable.
*/
static print_r(ctx: any, valArg?: PHPReference, returnValArg?: PHPReference): Promise<string | true>;
private static unwrapValue;
/** Finds whether a variable is an array. */
static is_array(ctx: PHPContext | null, valArg?: any): Promise<boolean>;
/** Finds whether a variable is a boolean. */
static is_bool(ctx: PHPContext | null, valArg?: any): Promise<boolean>;
/** Finds whether a variable is a float. */
static is_float(ctx: PHPContext | null, valArg?: any): Promise<boolean>;
/** Finds whether a variable is an integer. */
static is_int(ctx: PHPContext | null, valArg?: any): Promise<boolean>;
/** Finds whether a variable is NULL. */
static is_null(ctx: PHPContext | null, valArg?: any): Promise<boolean>;
/** Finds whether a variable is a number or a numeric string. */
static is_numeric(ctx: PHPContext | null, valArg?: any): Promise<boolean>;
/** Finds whether a variable is an object. */
static is_object(ctx: PHPContext | null, valArg?: any): Promise<boolean>;
/** Gets the properties of the given object. */
static get_object_vars(ctx: PHPContext | null, valueArg?: any): Promise<Record<string, any>>;
/** Finds whether a variable is a scalar. */
static is_scalar(ctx: PHPContext | null, valArg?: any): Promise<boolean>;
/** Finds whether a variable is a string. */
static is_string(ctx: PHPContext | null, valArg?: any): Promise<boolean>;
/** Verify that the contents of a variable is an iterable value. */
static is_iterable(ctx: PHPContext | null, valArg?: any): Promise<boolean>;
/** Verify that the contents of a variable is a countable value. */
static is_countable(ctx: PHPContext | null, valArg?: any): Promise<boolean>;
/** Finds whether a variable is a resource. */
static is_resource(ctx: PHPContext | null, valArg?: any): Promise<boolean>;
/** Get the type of a variable. */
static gettype(ctx: PHPContext | null, valArg?: any): Promise<string>;
/** Returns the name of the class of an object. */
static get_class(ctx: PHPContext | null, valArg?: any): Promise<string | false>;
/** Gets a prefixed unique identifier based on the current time in microseconds. */
static uniqid(ctx: PHPContext | null, prefixArg?: any, moreEntropyArg?: any): Promise<string>;
/** Get the integer value of a variable. */
static intval(ctx: PHPContext | null, valArg?: any, baseArg?: any): Promise<number>;
/** Get float value of a variable. */
static floatval(ctx: PHPContext | null, valArg?: any): Promise<number>;
/** Get string value of a variable. */
static strval(ctx: PHPContext | null, valArg?: any): Promise<string>;
/** Get the boolean value of a variable. */
static boolval(ctx: PHPContext | null, valArg?: any): Promise<boolean>;
static getenv(ctx: PHPContext, varnameArg?: any): Promise<string | false | Record<string, string>>;
static compact(ctx: PHPContext, ...args: PHPReference[]): Promise<Record<string, any>>;
static extract(ctx: PHPContext, arrayArg?: PHPReference): Promise<number>;
static var_export(ctx: PHPContext, valArg?: any, returnArg?: any, ...args: any[]): Promise<string | true>;
static functions: {
var_dump: typeof VariablesRuntime.var_dump;
print_r: typeof VariablesRuntime.print_r;
var_export: typeof VariablesRuntime.var_export;
is_array: typeof VariablesRuntime.is_array;
is_bool: typeof VariablesRuntime.is_bool;
is_float: typeof VariablesRuntime.is_float;
is_int: typeof VariablesRuntime.is_int;
is_null: typeof VariablesRuntime.is_null;
is_numeric: typeof VariablesRuntime.is_numeric;
is_object: typeof VariablesRuntime.is_object;
is_scalar: typeof VariablesRuntime.is_scalar;
is_string: typeof VariablesRuntime.is_string;
is_iterable: typeof VariablesRuntime.is_iterable;
is_countable: typeof VariablesRuntime.is_countable;
is_resource: typeof VariablesRuntime.is_resource;
gettype: typeof VariablesRuntime.gettype;
get_class: typeof VariablesRuntime.get_class;
get_object_vars: typeof VariablesRuntime.get_object_vars;
serialize: typeof VariablesRuntime.serialize;
uniqid: typeof VariablesRuntime.uniqid;
intval: typeof VariablesRuntime.intval;
floatval: typeof VariablesRuntime.floatval;
strval: typeof VariablesRuntime.strval;
boolval: typeof VariablesRuntime.boolval;
getenv: typeof VariablesRuntime.getenv;
compact: typeof VariablesRuntime.compact;
extract: typeof VariablesRuntime.extract;
};
static register(engine: PHPEngine): void;
}