Ejemplo n.º 1
0
 /**
  * __set() - method to set a variable/value in this objects namespace
  *
  * @param string $name
  * @param mixed $value
  * @return true
  */
 public function __set($name, $value)
 {
     if (isset(self::$_namespace_locks[$this->_namespace]) && self::$_namespace_locks[$this->_namespace] === true) {
         throw new Zend_Session_Exception("This session/namespace has been marked as read-only.");
     }
     return $this->_session_core->namespaceSet($this->_namespace, $name, $value);
 }
Ejemplo n.º 2
0
 /**
  * __set() - method to set a variable/value in this objects namespace
  *
  * @param string $name - programmatic name of a key, in a <key,value> pair in the current namespace
  * @param mixed $value - value in the <key,value> pair to assign to the $name key
  * @return true
  */
 protected function __set($name, $value)
 {
     if (isset(self::$_namespaceLocks[$this->_namespace])) {
         throw Zend::exception('Zend_Session_Exception', __CLASS__ . "This session/namespace has been marked as read-only.");
     }
     if ($name === '') {
         throw Zend::exception('Zend_Session_Exception', __CLASS__ . "::__set() the '{$name}' key must be a non-empty string");
     }
     return $this->_sessionCore->namespaceSet($this->_namespace, $name, $value);
 }