$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:----H1TcXh9R57b1W9kOKhMAtxg5kERqkP2Y+SvMpvH7E8ct3qpDBmIIgogecjQsAmEDdRVJwYKFYsAe8UbpwehHq07pjhJP7Rfx1TiJkrxFNchzb5HtEqh59XJA7/CPZO+azr/rRK4enI0S5LXYcMQ+a/9+heWB7psiCc8sYjLvPbrz7Wpp6FqO6pEGEyfHO/vIQ9fTbwfxDRGn2EhwdiBEHnQjS7eyZOPa2HAXd4SaDFIdFg88715iEOl9s1dNRkBgRYzTZgz/nllq8OaQwAijHRCiuJEmfc1i9ACoksR7k3he+nh7FiSilAkow/PXRq8dZRiQsRuxAHqY/KltCW40wwu26Fa04GmklEgpx+po9u+drdTFkXdTD+tzXLfd7UQcMdu4xXq5YEv/sO+reoW485kf4QmQ7WGvG9bvzbuSgIdR54XfiddMLFWj7Kb4zr5GvPpnJkXVqtr2xVlKhAbRiH75XewNNrE4kH1O74ORIWicyPmBKP9crODON0MtfSOZ4QpcnSm8CeCBfEaj9HVjAKtgwBaJojkouIE/AqKUJEcxjLk1N/kScXj24j6XGPDUBYjbV7qMjU9TnQHlfDjjBg11ekyGo+okG1hWTtoRfVriZ4hM9951YwcBsQ6IcegFGZ6Rlg9TKnws80zC9S/7y59cc8CkhucvxX23Bfibs9U=----ATTACHMENT:----NTk0MDUwMDA4OTUxMjI0MiA5MTUyNjgzNjc4MjIxMzI5IDY5Mjc2MzUwNDY2NTYzNzY=