Changeset 1243

Show
Ignore:
Timestamp:
01/16/08 14:36:14 (7 months ago)
Author:
mikey
Message:

replaced some overall used registry keys by class constants

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/auth/storage/stubAuthSessionStorage.php

    r1209 r1243  
    2525     */ 
    2626    protected $session; 
     27    /** 
     28     * session key for authentication result 
     29     */ 
     30    const SESSION_KEY_RESULT     = 'net.stubbles.auth.result'; 
     31    /** 
     32     * session key for result storage time 
     33     */ 
     34    const SESSION_KEY_STORE_TIME = 'net.stubbles.auth.storeTime' 
    2735 
    2836    /** 
     
    4351    protected function getStoreTime() 
    4452    { 
    45         return $this->session->getValue('net.stubbles.auth.storeTime', time()); 
     53        return $this->session->getValue(self::SESSION_KEY_STORE_TIME, time()); 
    4654    } 
    4755 
     
    5462    protected function doSetResult(stubAuthResult $result, $storeTime) 
    5563    { 
    56         $this->session->putValue('net.stubbles.auth.result', $result); 
    57         $this->session->putValue('net.stubbles.auth.storeTime', $storeTime); 
     64        $this->session->putValue(self::SESSION_KEY_RESULT, $result); 
     65        $this->session->putValue(self::SESSION_KEY_STORE_TIME, $storeTime); 
    5866        $this->session->regenerateId(); 
    5967    } 
     
    6674    public function getResult() 
    6775    { 
    68         return $this->session->getValue('net.stubbles.auth.result'); 
     76        return $this->session->getValue(self::SESSION_KEY_RESULT); 
    6977    } 
    7078 
     
    7482    public function clear() 
    7583    { 
    76         $this->session->removeValue('net.stubbles.auth.result'); 
    77         $this->session->removeValue('net.stubbles.auth.storeTime'); 
     84        $this->session->removeValue(self::SESSION_KEY_RESULT); 
     85        $this->session->removeValue(self::SESSION_KEY_STORE_TIME); 
    7886        $this->session->regenerateId(); 
    7987    }