26 $this->embedsResource = (bool)$embeds_resource;
33 public function make($string)
35 $embeds = ($string ===
'embedded');
45 public function validate($uri, $config, $context)
47 if ($config->get(
'URI.Disable')) {
54 $uri = $this->parser->parse($uri);
60 $context->register(
'EmbeddedURI', $this->embedsResource);
66 $result = $uri->validate($config, $context);
72 $uri_def = $config->getDefinition(
'URI');
73 $result = $uri_def->filter($uri, $config, $context);
79 $scheme_obj = $uri->getSchemeObj($config, $context);
83 if ($this->embedsResource && !$scheme_obj->browsable) {
86 $result = $scheme_obj->validate($uri, $config, $context);
92 $result = $uri_def->postFilter($uri, $config, $context);
102 $context->destroy(
'EmbeddedURI');
107 return $uri->toString();