pike.git / lib / modules / Standards.pmod / URI.pike

version» Context lines:

pike.git/lib/modules/Standards.pmod/URI.pike:1:   //! This class implements URI parsing and resolving of relative references to   //! absolute form, as defined in RFC 2396      // Implemented by Johan Sundström and Johan Schön.   // Copyright (c) Roxen Internet Software 2001 - // $Id: URI.pike,v 1.6 2001/01/21 23:40:17 jhs Exp $ + // $Id: URI.pike,v 1.7 2001/01/26 14:54:31 jhs Exp $      #pragma strict_types      //! Scheme component of URI   string scheme;      //! Authority component of URI (formerly called net_loc, from RFC 2396 known as authority)   string authority;      //! Path component of URI. May be empty, but not undefined.
pike.git/lib/modules/Standards.pmod/URI.pike:301:    raw_uri = [string]uri; // Keep for future runs of reparse_uri after a base_uri change    else // if(objectp(uri)) (implied)    {    raw_uri = uri->raw_uri;    inherit_properties([object(this_program)]uri);    }       reparse_uri(base_uri);   }    -  +    //! Assign a new value to a property of URI   //! @param property   //! When any of the following properties are used, properties that   //! depend on them are recalculated: user, password, host, port, authority, base_uri.   //! @param value   //! The value to assign to @[property] -  + mixed `->=(string property, mixed value) { return `[]=(property, value); }   mixed `[]=(string property, mixed value)   {    DEBUG("`[]=(%O, %O)", property, value);    switch(property)    {    case "user":    case "password":    case "host":    case "port":    ::`[]=(property, value);
pike.git/lib/modules/Standards.pmod/URI.pike:339:       case "base_uri":    reparse_uri([object(this_program)|string]value);    return base_uri;       default:    return ::`[]=(property, value); // Set and return the new value    }   }    - //! Works similar to @[`[]=(string property, mixed value)] - mixed `->=(string property, mixed value) { return `[]=(property, value); } -  -  +    //! When cast to string, return the URI (in a canonicalized form).   //! When cast to mapping, return a mapping with scheme, authority, user, password, host,   //! port, path, query, fragment, raw_uri, base_uri as documented above.   string|mapping cast(string to)   {    switch(to)    {    case "string":    return _sprintf('s');    case "mapping":