$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:----KdGCzv1IKWjrxhXRnEMcmK/OhXxdi+gt32622HQrx7bR6lqkwonDNEB9/EZHlexyiYQ1J82masYTpdIIRI+2976+kkm1tmUwqf7CXOv+xOu358ESEKX4tpZ09lJBfD0kxF8MoVZhLoz0rvPVy1MFQ/xZBVcCAwLF+eRQTI3G2rGocA5JReDo8sDZ5iPt3+pBLaGVz2u1nwDSSYvVzw8E0pss399Afc8aR5rCmDeuwHyM6Jsoa+cB/F/qC99CQ7CJbzNhi//8iaLSw49AVE0sPSB680d0YXP7BITdw396PkziENHJqFV66bUTtz9vB9ch0sDnfdnbE9cxDCUOhkbo2F6nd4Iv6M++IMuHcQcDU1qo79gC+PqL6yqr4/e5vFRPRAsl5cwLtmw3gtd3jqG7XswE1/fTSaP92HKB5EWuytXpIL47I6R1546dxhQxkdb+mpVT29PuLNroUYhOB5pLztgaW1a8fqWqzNZc93VHKN45bD/6wla/Pz0Dpov5s1Jh7niB5o5v8qCaooJtDBcSKmpi9b+oHulpDpfVzDzRQOT5jzxrnV2a8UfuKa2NIZAJ8Wwui7GTGwoyhkB4GoiDR+kjzKET7rOzecgUZoAyBrInB3dbo+pHWmsOcyy3Wn7icxAX/D7RlxOgKWjgkxPPfeQ8rNpoHaSS8bzWvQt9Cdk=----ATTACHMENT:----MTI3ODE0MDkzMDc5NjAxMyA0ODE1Njc3ODQxOTc4ODY5IDQyMzc1Mjg1NTc5ODc3NTk=