WACookie


Seaside-HTTP

Comment:



Hierarchy:

ProtoObject
Object
WACookie

Summary:

instance variables:

expiry key path value

methods:

instance class
as yet unclassified as yet unclassified

Detail:

instance variables:

expiry
inferredType:
UndefinedObject
key
inferredType:
UndefinedObject
path
inferredType:
UndefinedObject
value
inferredType:
UndefinedObject

instance methods:

as yet unclassified
expireIn: aDuration

	self expiry: DateAndTime now + aDuration
expiry

	^ expiry
expiry: aDateTime

	expiry _ aDateTime asUTC
expiryString

	^ String streamContents:
		[:s |
		s
			nextPutAll: (expiry dayOfWeekName first: 3);
			nextPutAll: ', ';
			nextPutAll: expiry dayOfMonth asString;
			nextPut: $-;
			nextPutAll: expiry monthName;
			nextPut: $-;
			nextPutAll: expiry year asString;
			space;
			nextPutAll: expiry hour24 asString;
			nextPut: $:;
			nextPutAll: expiry minute asString; 
			nextPut: $:;
			nextPutAll: expiry second asString;
			nextPutAll: ' GMT']
key

	^ key
key: aString

	key _ aString
path

	^ path ifNil: ['/']
path: aString

	path _ aString
value

	^ value
value: aString

	value _ aString
valueWithExpiry

	^ expiry
		ifNil: [self value]
		ifNotNil: [self value, '; expires=', self expiryString]

class methods:

as yet unclassified
key: keyString value: valueString

	^ self new
		key: keyString;
		value: valueString;
		yourself

^top


- made by Dandelion -