/** * ArrayAccess form of __unset * * @param mixed $name */ public function offsetUnset($name) { unset($this->_data[$name]); if ($this->_session->isActive()) { $this->_session->start(); unset($_SESSION[$this->_namespace][$name]); } }
public function __construct(Session $session) { $class_name = strtolower(str_replace(array('\\', '_'), array('', ''), get_called_class())); $this->_session = $session->get('auth_' . $class_name . '_user'); }