36 $this->registeredFilters[$filter->name] = $filter;
40 $r = $filter->prepare($config);
41 if ($r ===
false)
return;
43 $this->postFilters[$filter->name] = $filter;
45 $this->filters[$filter->name] = $filter;
55 foreach ($this->registeredFilters as $name => $filter) {
56 if ($filter->always_load) {
59 $conf = $config->get(
'URI.' . $name);
60 if ($conf !==
false && $conf !== null) {
65 unset($this->registeredFilters);
69 $this->host = $config->get(
'URI.Host');
70 $base_uri = $config->get(
'URI.Base');
71 if (!is_null($base_uri)) {
73 $this->base = $parser->parse($base_uri);
74 $this->defaultScheme = $this->base->scheme;
75 if (is_null($this->host)) $this->host = $this->base->host;
77 if (is_null($this->defaultScheme)) $this->defaultScheme = $config->get(
'URI.DefaultScheme');
84 public function filter(&$uri, $config, $context) {
85 foreach ($this->filters as $name => $f) {
86 $result = $f->filter($uri, $config, $context);
93 foreach ($this->postFilters as $name => $f) {
94 $result = $f->filter($uri, $config, $context);