Menu

## SandboxWhitelistVisitor extends NodeVisitorAbstract
in package

SandboxWhitelistVisitor.php : 21

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.

##### Tags

namespace

  PHPSandbox

author

  Elijah Horton elijah@corveda.com

version
  3.0

### Table of Contents

$sandbox : PHPSandbox
  The PHPSandbox instance to check against
__construct() : mixed
  SandboxWhitelistVisitor class constructor
leaveNode() : void
  Examine the current PhpParser\Node node against the PHPSandbox configuration for whitelisting sandboxed code

### Properties

#### $sandbox

SandboxWhitelistVisitor.php : 25

The PHPSandbox instance to check against

`protected PHPSandbox $sandbox`

### Methods

#### __construct()

SandboxWhitelistVisitor.php : 33

SandboxWhitelistVisitor class constructor

`public __construct(PHPSandbox $sandbox) : mixed`

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

##### Parameters

$sandbox : PHPSandbox

  The PHPSandbox instance to check against

##### Return values

mixed —

#### leaveNode()

SandboxWhitelistVisitor.php : 43

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

`public leaveNode(Node $node) : void`

##### Parameters

$node : Node

  The sandboxed $node to examine

##### Return values

void —

## Search results