Example #1
0
 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;
 }
Example #2
0
 function uri_store($data)
 {
     if (!(string) $data) {
         return null;
     }
     return so_uri::make($data);
 }
Example #3
0
 function uriVersioned_make()
 {
     $uri = so_uri::makeInstance();
     $uri->path = strtr($this->relate(getcwd()), array('%' => urlencode('%')));
     $uri->queryString = $this->version;
     return $uri->primary();
 }
Example #4
0
 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);
 }
Example #5
0
 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;
 }
Example #6
0
 function map_make()
 {
     $map = $this->database->dump;
     foreach ($map as &$record) {
         $record = so_uri::make($record['so_gist_uri'])->query->resource;
     }
     return $map;
 }
Example #7
0
 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;
 }
Example #8
0
 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();
 }
Example #9
0
 function uri_store($data)
 {
     $query = so_uri::make($data)->query;
     $this->id = $query['image'];
 }
Example #10
0
 function uri_make()
 {
     $uri = so_uri::makeInstance();
     $uri->path = strtr($this->relate(so_front::make()->dir), array('%' => urlencode('%')));
     return $uri->primary();
 }
Example #11
0
 function uri_store($data)
 {
     $query = so_uri::make($data)->query;
     $this->search = $query['search'];
 }
Example #12
0
 function uri_make()
 {
     return so_uri::makeInstance()->query($this)->primary();
 }
Example #13
0
 function uri_store($data)
 {
     $query = so_uri::make($data)->query;
     $this->name = $query['author'];
 }
Example #14
0
 function uri_store($data)
 {
     return so_uri::make($data);
 }