18 $this->embedsResource = (bool) $embeds_resource;
21 public function make($string) {
22 $embeds = (bool) $string;
28 if (
$config->get(
'URI.Disable'))
return false;
33 $uri = $this->parser->parse($uri);
34 if ($uri ===
false)
return false;
37 $context->register(
'EmbeddedURI', $this->embedsResource);
43 $result = $uri->validate(
$config, $context);
47 $uri_def =
$config->getDefinition(
'URI');
48 $result = $uri_def->filter($uri,
$config, $context);
52 $scheme_obj = $uri->getSchemeObj(
$config, $context);
53 if (!$scheme_obj)
break;
54 if ($this->embedsResource && !$scheme_obj->browsable)
break;
55 $result = $scheme_obj->validate($uri,
$config, $context);
59 $result = $uri_def->postFilter($uri,
$config, $context);
67 $context->destroy(
'EmbeddedURI');
68 if (!
$ok)
return false;
71 return $uri->toString();