SerializePlugin
extends Plugin
in package
Table of Contents
- $options : mixed
- $safe_mode : bool
- Disables automatic unserialization on arrays and objects.
- $parser : mixed
- getTriggers() : mixed
- getTypes() : array<string|int, mixed>
- An array of types (As returned by gettype) for all data this plugin can operate on.
- parse() : mixed
- setParser() : mixed
Properties
$options
public
static mixed
$options
= array(true)
$safe_mode
Disables automatic unserialization on arrays and objects.
public
static bool
$safe_mode
= true
As the PHP manual notes:
Unserialization can result in code being loaded and executed due to object instantiation and autoloading, and a malicious user may be able to exploit this.
The natural way to stop that from happening is to just refuse to unserialize stuff by default. Which is what we're doing for anything that's not scalar.
$parser
protected
mixed
$parser
Methods
getTriggers()
public
getTriggers() : mixed
Return values
mixed —getTypes()
An array of types (As returned by gettype) for all data this plugin can operate on.
public
getTypes() : array<string|int, mixed>
Return values
array<string|int, mixed> —List of types
parse()
public
parse(mixed &$var, BasicObject &$o, mixed $trigger) : mixed
Parameters
- $var : mixed
- $o : BasicObject
- $trigger : mixed
Return values
mixed —setParser()
public
setParser(Parser $p) : mixed
Parameters
- $p : Parser