public function value($key) {
        if (!isset($_COOKIE[$key])) {
            return null;
        }
        if ($this->hashed) {
            list($value, $hash) = unserialize($_COOKIE[$key]);
            if ($hash != hash('sha256', $value . $this->salt)) {
                return null;
            }
        } else {
            $value = $_COOKIE[$key];
        }
        return unserialize($value);
    }
public function value($key) {
        if (!isset($_COOKIE[$key])) {
            return null;
        }
        if ($this->hashed) {
            list($value, $hash) = unserialize($_COOKIE[$key]);
            if ($hash != hash('sha256', $value . $this->salt)) {
                return null;
            }
        } else {
            $value = $_COOKIE[$key];
        }
        return unserialize($value);
    }
public function value ( $ key ) { if ( ! isset ( $ _COOKIE [ $ key ] ) ) { return null ; } if ( $ this -> hashed ) { list ( $ value , $ hash ) = unserialize ( $ _COOKIE [ $ key ] ) ; if ( $ hash != hash ( 'sha256' , $ value . $ this -> salt ) ) { return null ; } } else { $ value = $ _COOKIE [ $ key ] ; } return unserialize ( $ value ) ; }
Get cookie value for selected key.
@param string $key
@return mixed|null
Get cookie value for selected key .