public function isAllowedProtocol($value) { foreach ($this->scheme_whitelist as $protocol) { if (strpos($value, $protocol) === 0) { return true; } } return false; }