original_string: final public function lock($namespace)
      {
          //locks a namespace in this session to prevent editing
          if (empty($namespace)) {
              //@TODO throw an exception,
              //we don't know what namespace this is
              return false;
          }
          $session = $this;
          //unlocks a namespace
          if (isset($session->registry[$namespace]) && !$session->isLocked($namespace)) {
              $session->registry[$namespace]->lock();
              return true;
          }
  
          return false;
      }
code: final public function lock($namespace)
      {
          //locks a namespace in this session to prevent editing
          if (empty($namespace)) {
              //@TODO throw an exception,
              //we don't know what namespace this is
              return false;
          }
          $session = $this;
          //unlocks a namespace
          if (isset($session->registry[$namespace]) && !$session->isLocked($namespace)) {
              $session->registry[$namespace]->lock();
              return true;
          }
  
          return false;
      }
code_tokens: final public function lock ( $ namespace ) { //locks a namespace in this session to prevent editing if ( empty ( $ namespace ) ) { //@TODO throw an exception, //we don't know what namespace this is return false ; } $ session = $ this ; //unlocks a namespace if ( isset ( $ session -> registry [ $ namespace ] ) && ! $ session -> isLocked ( $ namespace ) ) { $ session -> registry [ $ namespace ] -> lock ( ) ; return true ; } return false ; }
docstring: Locks a namespaced registry to prevent further edits
  
  @param type $namespace
  @return type
docstring_tokens: Locks a namespaced registry to prevent further edits