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;
    }
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;
    }
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 ; }
Locks a namespaced registry to prevent further edits

@param type $namespace
@return type
Locks a namespaced registry to prevent further edits