Esempio n. 1
0
 /** Checks the string value against the sandbox function whitelists and blacklists for callback violations
  * @return mixed|null
  */
 public function __invoke()
 {
     if ($this->sandbox->checkFunc($this->value)) {
         $name = strtolower($this->value);
         if (in_array($name, PHPSandbox::$defined_funcs) && $this->sandbox->overwrite_defined_funcs || in_array($name, PHPSandbox::$sandboxed_string_funcs) && $this->sandbox->overwrite_sandboxed_string_funcs || in_array($name, PHPSandbox::$arg_funcs) && $this->sandbox->overwrite_func_get_args) {
             return call_user_func_array([$this->sandbox, '_' . $this->value], func_get_args());
         }
         return call_user_func_array($name, func_get_args());
     }
     return '';
 }