PHP Класс 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.
Показать файл
Открыть проект
Защищенные свойства (Protected)
Свойство |
Тип |
Описание |
|
$sandbox |
PHPSandbox |
The PHPSandbox instance to check against |
|
Открытые методы
Метод |
Описание |
|
__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 |
|
Описание методов
__construct()
публичный метод
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()
публичный метод
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 |
Результат |
null | boolean |
Return false if node must be removed, or null if no changes to the node are made |
Описание свойств
$sandbox защищенное свойство
The PHPSandbox instance to check against
protected PHPSandbox,phpsandbox $sandbox |
Результат |
PHPSandbox |
|