function post($data) { $subject = so_uri::make($data['subject']); $event = (string) $data['event']; $this->database[] = array('so_subscriber_uri' => $subject, 'so_subscriber_event' => $event); return $this; }
function uri_store($data) { if (!(string) $data) { return null; } return so_uri::make($data); }
function uriVersioned_make() { $uri = so_uri::makeInstance(); $uri->path = strtr($this->relate(getcwd()), array('%' => urlencode('%'))); $uri->queryString = $this->version; return $uri->primary(); }
function uri_make() { $uri = so_value::make($_SERVER['REQUEST_URI']); //$uri= mb_convert_encoding( $uri, 'UTF-8', 'windows-1251' ); $uri = iconv('windows-1251', 'UTF-8', $uri); return so_uri::make($uri); }
function uri_store($data) { $query = so_uri::make($data)->query; $this->name = $query['article']; $author = hyoo_author::makeInstance()->name($query['author'])->primary(); $this->author = $author; }
function map_make() { $map = $this->database->dump; foreach ($map as &$record) { $record = so_uri::make($record['so_gist_uri'])->query->resource; } return $map; }
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(); }
function uri_store($data) { $query = so_uri::make($data)->query; $this->id = $query['image']; }
function uri_make() { $uri = so_uri::makeInstance(); $uri->path = strtr($this->relate(so_front::make()->dir), array('%' => urlencode('%'))); return $uri->primary(); }
function uri_store($data) { $query = so_uri::make($data)->query; $this->search = $query['search']; }
function uri_make() { return so_uri::makeInstance()->query($this)->primary(); }
function uri_store($data) { $query = so_uri::make($data)->query; $this->name = $query['author']; }
function uri_store($data) { return so_uri::make($data); }