39 $this->registeredFilters[$filter->name] = $filter;
44 $r = $filter->prepare($config);
45 if ($r ===
false)
return;
47 $this->postFilters[$filter->name] = $filter;
49 $this->filters[$filter->name] = $filter;
61 foreach ($this->registeredFilters as $name => $filter) {
62 if ($filter->always_load) {
65 $conf = $config->get(
'URI.' . $name);
66 if ($conf !==
false && $conf !== null) {
71 unset($this->registeredFilters);
76 $this->host = $config->get(
'URI.Host');
77 $base_uri = $config->get(
'URI.Base');
78 if (!is_null($base_uri)) {
80 $this->base = $parser->parse($base_uri);
81 $this->defaultScheme = $this->base->scheme;
82 if (is_null($this->host)) $this->host = $this->base->host;
84 if (is_null($this->defaultScheme)) $this->defaultScheme = $config->get(
'URI.DefaultScheme');
92 public function filter(&$uri, $config, $context)
94 foreach ($this->filters as $name => $f) {
95 $result = $f->filter($uri, $config, $context);
103 foreach ($this->postFilters as $name => $f) {
104 $result = $f->filter($uri, $config, $context);