HTMLPurifier_Context
in package
Registry object that contains information about the current context.
Tags
Table of Contents
Properties
- $_storage : mixed
- Private array that stores the references.
Methods
- destroy() : mixed
- Destroys a variable in the context.
- exists() : bool
- Checks whether or not the variable exists.
- get() : mixed
- Retrieves a variable reference from the context.
- loadArray() : mixed
- Loads a series of variables from an associative array
- register() : mixed
- Registers a variable into the context.
Properties
$_storage
Private array that stores the references.
private
mixed
$_storage
= array()
Tags
Methods
destroy()
Destroys a variable in the context.
public
destroy(string $name) : mixed
Parameters
- $name : string
-
String name
exists()
Checks whether or not the variable exists.
public
exists(string $name) : bool
Parameters
- $name : string
-
String name
Return values
boolget()
Retrieves a variable reference from the context.
public
& get(string $name[, bool $ignore_error = false ]) : mixed
Parameters
- $name : string
-
String name
- $ignore_error : bool = false
-
Boolean whether or not to ignore error
loadArray()
Loads a series of variables from an associative array
public
loadArray(array<string|int, mixed> $context_array) : mixed
Parameters
- $context_array : array<string|int, mixed>
-
Assoc array of variables to load
register()
Registers a variable into the context.
public
register(string $name, mixed &$ref) : mixed
Parameters
- $name : string
-
String name
- $ref : mixed
-
Reference to variable to be registered