Roxen.git / server / base_server / basic_defvar.pike

version» Context lines:

Roxen.git/server/base_server/basic_defvar.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 2000 - 2009, Roxen IS. - // $Id: basic_defvar.pike,v 1.34 2009/10/31 17:12:34 mast Exp $ + // $Id$      //! @appears BasicDefvar      mapping(string:Variable.Variable) variables=([]);   //! Please do not modify this list directly, instead use   //! defvar, killvar, getvar, query and set      #include <module.h>   mapping(string:Variable.Variable) getvars( )   {
Roxen.git/server/base_server/basic_defvar.pike:61:   void setvars( mapping (string:mixed) vars )   //! Set the variables from the mapping, which should be on the form   //! ([ "variable name":value, ... ]).   //! Used by roxen internals, not all that useful for the module   //! programmer.   {    string v;    Variable.Variable q;    foreach( indices( vars ), v )    if(q = variables[v]) -  q->set( vars[v] ); +  q->decode( vars[v] );   }      //! @decl Variable.Variable defvar( string sname, Variable.Variable variable )   //! Define 'sname' to be 'variable',      //! @decl Variable.Variable defvar( string sname, mixed value, string name, @   //! int type, string doc, array|void misc, @   //! int|function not_in_config )   //! Define a new variable named sname, with the options specified in the list.   //! This is a compatibility version of the function, and as such is deprecated.