$sandbox
$sandbox : \PHPSandbox\PHPSandbox
The PHPSandbox instance to check against
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.
$sandbox : \PHPSandbox\PHPSandbox
The PHPSandbox instance to check against
__construct(\PHPSandbox\PHPSandbox $sandbox)
WhitelistVisitor class constructor
This constructor takes a passed PHPSandbox instance to check against for whitelisting trusted code.
\PHPSandbox\PHPSandbox | $sandbox | The PHPSandbox instance to check against |
leaveNode(\PhpParser\Node $node) : null|boolean
Examine the current PhpParser_Node node against the PHPSandbox configuration for whitelisting trusted code
\PhpParser\Node | $node | The trusted $node to examine |
Return false if node must be removed, or null if no changes to the node are made