PHP Class PhpSandbox\SandboxWhitelistVisitor
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.
Show file
Open project: Corveda/PHPSandbox
Protected Properties
Property |
Type |
Description |
|
$sandbox |
PHPSandbox |
The PHPSandbox instance to check against |
|
Public Methods
Method |
Description |
|
__construct ( PHPSandbox $sandbox ) |
SandboxWhitelistVisitor class constructor |
|
leaveNode ( PhpParser\Node $node ) : null |
Examine the current PhpParser\Node node against the PHPSandbox configuration for whitelisting sandboxed code |
|
Method Details
__construct()
public method
This constructor takes a passed PHPSandbox instance to check against for whitelisting sandboxed code.
public __construct ( PHPSandbox $sandbox ) |
$sandbox |
PHPSandbox |
The PHPSandbox instance to check against |
leaveNode()
public method
Examine the current PhpParser\Node node against the PHPSandbox configuration for whitelisting sandboxed code
public leaveNode ( PhpParser\Node $node ) : null |
$node |
PhpParser\Node |
The sandboxed $node to examine |
return |
null |
|
Property Details
$sandbox protected property
The PHPSandbox instance to check against
protected PHPSandbox,phpsandbox $sandbox |
return |
PHPSandbox |
|