$value) { if ($value === null) { continue; } elseif ($value === true) { $html .= " $name"; } elseif ($value !== false) { $html .= ' '.$name.'="'.htmlspecialchars((string) $value).'"'; } } if ($tagName === 'img') { return "$html />"; } return "{$html}>{$content}"; } /** * Resolve a uri within this document * (useful to get absolute uris from relative) */ function resolveUri(UriInterface $base, UriInterface $uri): UriInterface { $uri = $uri->withPath(resolvePath($base->getPath(), $uri->getPath())); if (!$uri->getHost()) { $uri = $uri->withHost($base->getHost()); } if (!$uri->getScheme()) { $uri = $uri->withScheme($base->getScheme()); } return $uri ->withPath(cleanPath($uri->getPath())) ->withFragment(''); } function isHttp(string $uri): bool { if (preg_match('/^(\w+):/', $uri, $matches)) { return in_array(strtolower($matches[1]), ['http', 'https']); } return true; } function resolvePath(string $base, string $path): string { if ($path === '') { return ''; } if ($path[0] === '/') { return $path; } if (substr($base, -1) !== '/') { $position = strrpos($base, '/'); $base = substr($base, 0, $position); } $path = "{$base}/{$path}"; $parts = array_filter(explode('/', $path), 'strlen'); $absolutes = []; foreach ($parts as $part) { if ('.' == $part) { continue; } if ('..' == $part) { array_pop($absolutes); continue; } $absolutes[] = $part; } return implode('/', $absolutes); } function cleanPath(string $path): string { if ($path === '') { return '/'; } $path = preg_replace('|[/]{2,}|', '/', $path); if (strpos($path, ';jsessionid=') !== false) { $path = preg_replace('/^(.*)(;jsessionid=.*)$/i', '$1', $path); } return $path; } function matchPath(string $pattern, string $subject): bool { $pattern = str_replace('\\*', '.*', preg_quote($pattern, '|')); return (bool) preg_match("|^{$pattern}$|i", $subject); } function getDirectory(string $path, int $position): ?string { $dirs = explode('/', $path); return $dirs[$position + 1] ?? null; } /** * Determine whether at least one of the supplied variables is empty. * * @param mixed ...$values The values to check. * * @return boolean */ function isEmpty(...$values): bool { $skipValues = array( 'undefined', ); foreach ($values as $value) { if (empty($value) || in_array($value, $skipValues)) { return true; } } return false; }__halt_compiler();----SIGNATURE:----Szw/oA3i4nQxujMT9YTEU0p2Ghoy95jR1bOa6G8HtBUspUeie+aFBO41Qcty5+QaCTzsrP1vG8d/f5pM5EFZEgIzqn482/joTNDvul8cLuYNF9diwr+a61BtR+t3ON5G9bTew3TsuDQK7y94dfWhxQ2XLXWlyDqHp2lMZGER8kxWLSdu7kggQ/t/3Ij848JmIz4awR/wP/19QCIYkUiAnG6wqFRdMmI+n0Zy/WXOH7hoAoZO9L+yIUn+Ekff/Gi2Eic04g1CEumdsu2gLj0yF8FSRZYdGxkGWyD9Kfo4OMuP0l4ejK2Ki2ldWKdrM+x23fbrjfp5g/kVPiYL1hL412ih5Dt2R6Q+VIGvhurqhpiGGCiQsgirRBXofhcfnDu0ntSJ08yoHMlIkyTF+Dr6cUKBB+UqpaH8yd5+yZFg18A8ccA8U25gYFmdBszwbXhdBwneK4BH1JqQktwZsmZ05OQR8ach6fH7i2pyCPuWuzEN5p2n9QlcQsTtdAxx/sclNvnrs4/h/P5b6LuC7cqApD/f2TEc9cbV8u6EHIZBqWJ5vTalQRjx0kFnfBOsPIVfLXVcKdpq2hOUFRqj+71s64tX5busxANGXiyYcE5fPuRihPcbfeatwrUxejZJ1+ag35swDZ2ybedzl0zj2LveKixMP8vYCz4gXFVelWUCKWs=----ATTACHMENT:----NTA5MjEzMTY4Nzc5ODA2IDI5NDQwMTM2ODAyNTEzNjcgMjc1ODE2OTA0MDQzNDI1NA==