Beispiel #1
0
 public function __get($key)
 {
     if ($key == 'sessionid') {
         return self::$_sessionid;
     } else {
         if (in_array($key, array('host', 'user', 'password', 'hash', 'start'))) {
             $key = '_' . $key;
             return $this->{$key};
         } else {
             $sd = new modl\SessionxDAO();
             $session = $sd->get(self::$_sessionid);
             if (isset($session->config)) {
                 $session->config = unserialize($session->config);
             }
             if (isset($session)) {
                 return $session->{$key};
             } else {
                 return null;
             }
         }
     }
 }
Beispiel #2
0
 public function __get($key)
 {
     if ($key == 'rid') {
         $sd = new modl\SessionxDAO();
         $this->_rid = $sd->getRid(self::$_sessionid);
         return $this->_rid;
     } else {
         if (in_array($key, array('port', 'id', 'host', 'domain', 'user', 'password', 'hash', 'start', 'mechanism'))) {
             $key = '_' . $key;
             return $this->{$key};
         } else {
             $sd = new modl\SessionxDAO();
             $session = $sd->get(self::$_sessionid);
             if (isset($session->config)) {
                 $session->config = unserialize($session->config);
             }
             if ($key == 'currentid') {
                 $key = 'id';
             }
             if (isset($session)) {
                 return $session->{$key};
             } else {
                 return null;
             }
         }
     }
 }