37 $this->registeredFilters[$filter->name] = $filter;
41 $r = $filter->prepare($config);
42 if ($r ===
false)
return;
44 $this->postFilters[$filter->name] = $filter;
46 $this->filters[$filter->name] = $filter;
56 foreach ($this->registeredFilters as $name => $filter) {
57 if ($filter->always_load) {
60 $conf = $config->get(
'URI.' . $name);
61 if ($conf !==
false && $conf !== null) {
66 unset($this->registeredFilters);
70 $this->host = $config->get(
'URI.Host');
71 $base_uri = $config->get(
'URI.Base');
72 if (!is_null($base_uri)) {
74 $this->base = $parser->parse($base_uri);
75 $this->defaultScheme = $this->base->scheme;
76 if (is_null($this->host)) $this->host = $this->base->host;
78 if (is_null($this->defaultScheme)) $this->defaultScheme = $config->get(
'URI.DefaultScheme');
85 public function filter(&$uri, $config, $context) {
86 foreach ($this->filters as $name => $f) {
87 $result = $f->filter($uri, $config, $context);
94 foreach ($this->postFilters as $name => $f) {
95 $result = $f->filter($uri, $config, $context);