PHP Class PhpSandbox\WhitelistVisitor
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.
Afficher le fichier
Open project: Corveda/PHPSandbox
Protected Properties
Свойство |
Type |
Description |
|
$sandbox |
PHPSandbox |
The PHPSandbox instance to check against |
|
Méthodes publiques
Méthode |
Description |
|
__construct ( PHPSandbox $sandbox ) |
WhitelistVisitor class constructor |
|
leaveNode ( PhpParser\Node $node ) : null | boolean |
Examine the current PhpParser_Node node against the PHPSandbox configuration for whitelisting trusted code |
|
Method Details
__construct()
public méthode
This constructor takes a passed PHPSandbox instance to check against for whitelisting trusted code.
public __construct ( PHPSandbox $sandbox ) |
$sandbox |
PHPSandbox |
The PHPSandbox instance to check against |
leaveNode()
public méthode
Examine the current PhpParser_Node node against the PHPSandbox configuration for whitelisting trusted code
public leaveNode ( PhpParser\Node $node ) : null | boolean |
$node |
PhpParser\Node |
The trusted $node to examine |
Résultat |
null | boolean |
Return false if node must be removed, or null if no changes to the node are made |
Property Details
$sandbox protected_oe property
The PHPSandbox instance to check against
protected PHPSandbox,phpsandbox $sandbox |
Résultat |
PHPSandbox |
|