public function getKey($keyname = self::DEFAULT_KEY)
    {
        if (!isset($this->_keyCache[$keyname])) {
            if (isset($_COOKIE[$keyname . '_key'])) {
                $key = $_COOKIE[$keyname . '_key'];
            } else {
                $key = session_id();
                $this->_setCookie($keyname, $key);
            }

            $this->_keyCache[$keyname] = $key;
        }

        return $this->_keyCache[$keyname];
    }
public function getKey($keyname = self::DEFAULT_KEY)
    {
        if (!isset($this->_keyCache[$keyname])) {
            if (isset($_COOKIE[$keyname . '_key'])) {
                $key = $_COOKIE[$keyname . '_key'];
            } else {
                $key = session_id();
                $this->_setCookie($keyname, $key);
            }

            $this->_keyCache[$keyname] = $key;
        }

        return $this->_keyCache[$keyname];
    }
public function getKey ( $ keyname = self :: DEFAULT_KEY ) { if ( ! isset ( $ this -> _keyCache [ $ keyname ] ) ) { if ( isset ( $ _COOKIE [ $ keyname . '_key' ] ) ) { $ key = $ _COOKIE [ $ keyname . '_key' ] ; } else { $ key = session_id ( ) ; $ this -> _setCookie ( $ keyname , $ key ) ; } $ this -> _keyCache [ $ keyname ] = $ key ; } return $ this -> _keyCache [ $ keyname ] ; }
Return a secret key, either from a cookie, or if the cookie
isn't there, assume we are using a munged version of a known
base value.

@param string $keyname  The name of the key to get.

@return string  The secret key.
Return a secret key either from a cookie or if the cookie isn t there assume we are using a munged version of a known base value .