PhpSandbox\PHPSandbox::isWhitelistedSuperglobal PHP Méthode

isWhitelistedSuperglobal() public méthode

Check if PHPSandbox instance has whitelisted superglobal or superglobal key set
public isWhitelistedSuperglobal ( string $name, string $key = null ) : boolean
$name string String of whitelisted superglobal $name to query
$key string String of whitelisted superglobal $key to query
Résultat boolean Returns true if PHPSandbox instance has whitelisted superglobal key or superglobal, false otherwise
    public function isWhitelistedSuperglobal($name, $key = null)
    {
        $name = $this->normalizeSuperglobal($name);
        return $key !== null ? isset($this->whitelist['superglobals'][$name][$key]) : isset($this->whitelist['superglobals'][$name]);
    }
PHPSandbox