function disallow($subject, $action) { so_uri::ensure($subject); foreach ($this->list as $permit) { if (!$subject->query->match($permit['so_permit_pattern'])) { continue; } if ($permit['@so_permit_action'] != (string) $action) { continue; } unset($this->storage[$permit['id']]); } unset($this->list); return $this; }
function go($rel) { so_uri::ensure($rel); $target = so_uri::makeInstance(); $target->scheme = $rel->scheme ?: $this->scheme; $target->login = $rel->login ?: $this->login; $target->password = $rel->password ?: $this->password; $target->host = $rel->host ?: $this->host; $target->port = $rel->port ?: $this->port; $target->path = $rel->path ?: $this->path; // TODO: resolve relative path $target->queryString = $rel->queryString ?: $this->queryString; $target->anchor = $rel->anchor ?: $this->anchor; return $target->primary(); }