# \PHPSandboxWhitelistVisitor

Whitelister class for PHP Sandboxes.

This class takes parsed AST code and checks it against the passed PHPSandbox instance configuration to autmatically whitelist trusted 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

File
  WhitelistVisitor.php
Package
  PHPSandbox
Class hierarchy
  \PhpParser\NodeVisitorAbstract
  \PHPSandbox\WhitelistVisitor

## Tags

namespace | PHPSandbox
author | Elijah Horton elijah@corveda.com
version |

## Properties

### $sandbox

    $sandbox : \PHPSandbox\PHPSandbox

The PHPSandbox instance to check against

#### Type

\PHPSandbox\PHPSandbox

#

## Tags

None found

## Methods

### __construct()

    __construct(\PHPSandbox\PHPSandbox  $sandbox)

WhitelistVisitor class constructor

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

#### Parameters

\PHPSandbox\PHPSandbox | $sandbox | The PHPSandbox instance to check against

#

## Tags

None found

### leaveNode()

    leaveNode(\PhpParser\Node  $node) : null|boolean

Examine the current PhpParser_Node node against the PHPSandbox configuration for whitelisting trusted code

#### Parameters

\PhpParser\Node | $node | The trusted $node to examine

#### Returns

null|boolean —

Return false if node must be removed, or null if no changes to the node are made

#

## Tags

None found

### WhitelistVisitor.php