\PHPSandboxSandboxWhitelistVisitor

SandboxWhitelister class for PHP Sandboxes.

This class takes parsed AST code and checks it against the passed PHPSandbox instance configuration to autmatically whitelist sandboxed code functions, classes, etc. if the appropriate settings are configured.

Summary

Methods
Properties
Constants
__construct()
leaveNode()
No public properties found
No constants found
No protected methods found
$sandbox
N/A
No private methods found
No private properties found
N/A

Properties

$sandbox

$sandbox : \PHPSandbox\PHPSandbox

The PHPSandbox instance to check against

Type

\PHPSandbox\PHPSandbox

Methods

__construct()

__construct(\PHPSandbox\PHPSandbox  $sandbox) 

SandboxWhitelistVisitor class constructor

This constructor takes a passed PHPSandbox instance to check against for whitelisting sandboxed code.

Parameters

\PHPSandbox\PHPSandbox $sandbox

The PHPSandbox instance to check against

leaveNode()

leaveNode(\PhpParser\Node  $node) : null

Examine the current PhpParser\Node node against the PHPSandbox configuration for whitelisting sandboxed code

Parameters

\PhpParser\Node $node

The sandboxed $node to examine

Returns

null