예제 #1
0
 public function clear($name)
 {
     $name = (string) $name;
     if ($this->propertyExists($name, 'set')) {
         return parent::clear($name);
     }
     return $this->_clearByKey($name, $GLOBALS[$this->_getSourceName()]);
 }
예제 #2
0
 /**
  * Clear setting value
  *
  * Clear the setting value and return former value. If a setting with the
  * name specified is not found, null is returned.
  *
  * @uses AeSettings_Driver::$_namePattern
  *
  * @throws AeSettingsDriverException #400 if setting name is invalid
  *
  * @param string $name setting name
  *
  * @return AeType|mixed former setting value
  */
 public function clear($name)
 {
     $name = (string) $name;
     if ($this->propertyExists($name, 'set')) {
         return parent::clear($name);
     }
     if (!preg_match($this->_namePattern, $name)) {
         throw new AeSettingsDriverException('Setting name is invalid', 400);
     }
     if (strpos($name, '.')) {
         list($section, $name) = explode('.', $name, 2);
     } else {
         $section = $this->section;
     }
     return parent::clear($section . '.' . $name);
 }
예제 #3
0
 /**
  * Clear session variable
  *
  * Removes the session variable, identified by the <var>$name</var>
  * parameter
  *
  * @uses AeSession::_check() to check for session state
  *
  * @throws AeSessionException #403 if session validation failed
  * @throws AeSessionException #408 if session has expired
  * @throws AeSessionException #412 if session has been destroyed
  *
  * @param string $name
  *
  * @return AeSession self
  */
 public function clear($name)
 {
     $name = (string) $name;
     if ($this->propertyExists($name, 'set')) {
         return parent::clear($name);
     }
     $this->_check();
     $this->_clearByKey((string) $name, $_SESSION);
     return $this;
 }