/** * Call a method if in whitelist * * @param string $method * @param array $arguments * @return mixed|void * @throws NotAllowedException */ public function call($method, array $arguments = []) { if ($this->value === null || isset($this->whitelist[$method]) || isset($this->whitelist['*']) || $this->value instanceof ProtectedContextAwareInterface && $this->value->allowsCallOfMethod($method)) { return parent::call($method, $arguments); } throw new NotAllowedException('Method "' . $method . '" is not callable in untrusted context', 1369043080); }