original_string: final public function set($varname, $value = NULL, $namespace = 'default')
      {
          //stores a value to a varname in a namespace of this session
          $session = $this;
  
          if (!isset($namespace) || empty($namespace)) {
              //@TODO Throw an exception, we need a name or use the default;
              throw new Exception("Cannot set new Session variable to unknown '{$namespace}' namespace");
              return false;
          }
  
  
          //If we don't have a registry to that namespace;
          if (!isset($session->registry[$namespace])) {
              //Create it;
              $registry = new Registry($namespace);
              $session->registry[$namespace] = $registry;
          }
  
          //echo $namespace;
          //@TODO, check if the regitry is not locked before adding
          if (!$session->isLocked($namespace)) {
              $registry = $session->getNamespace($namespace);
              $registry->set($varname, $value);
          }
          //If auth is locked
  
          return $session;
      }
code: final public function set($varname, $value = NULL, $namespace = 'default')
      {
          //stores a value to a varname in a namespace of this session
          $session = $this;
  
          if (!isset($namespace) || empty($namespace)) {
              //@TODO Throw an exception, we need a name or use the default;
              throw new Exception("Cannot set new Session variable to unknown '{$namespace}' namespace");
              return false;
          }
  
  
          //If we don't have a registry to that namespace;
          if (!isset($session->registry[$namespace])) {
              //Create it;
              $registry = new Registry($namespace);
              $session->registry[$namespace] = $registry;
          }
  
          //echo $namespace;
          //@TODO, check if the regitry is not locked before adding
          if (!$session->isLocked($namespace)) {
              $registry = $session->getNamespace($namespace);
              $registry->set($varname, $value);
          }
          //If auth is locked
  
          return $session;
      }
code_tokens: final public function set ( $ varname , $ value = NULL , $ namespace = 'default' ) { //stores a value to a varname in a namespace of this session $ session = $ this ; if ( ! isset ( $ namespace ) || empty ( $ namespace ) ) { //@TODO Throw an exception, we need a name or use the default; throw new Exception ( "Cannot set new Session variable to unknown '{$namespace}' namespace" ) ; return false ; } //If we don't have a registry to that namespace; if ( ! isset ( $ session -> registry [ $ namespace ] ) ) { //Create it; $ registry = new Registry ( $ namespace ) ; $ session -> registry [ $ namespace ] = $ registry ; } //echo $namespace; //@TODO, check if the regitry is not locked before adding if ( ! $ session -> isLocked ( $ namespace ) ) { $ registry = $ session -> getNamespace ( $ namespace ) ; $ registry -> set ( $ varname , $ value ) ; } //If auth is locked return $ session ; }
docstring: Sets a value for storage in a namespaced registry
  
  @param type $varname
  @param type $value
  @param type $namespace
  @return Session
docstring_tokens: Sets a value for storage in a namespaced registry