| Portability | portable |
|---|---|
| Stability | experimental |
| Maintainer | Edward L. Blake <edwardlblake@gmail.com> |
| Safe Haskell | Safe-Inferred |
Data.PHPSession
Contents
Description
Encodes and decodes serialized PHP sessions in the format used by the "php" setting for session.serialize_handler.
- decodePHPSession :: ByteString -> Maybe PHPSessionVariableList
- decodePHPSessionValue :: ByteString -> Maybe PHPSessionValue
- encodePHPSession :: PHPSessionVariableList -> ByteString
- encodePHPSessionValue :: PHPSessionValue -> ByteString
- decodePartialPHPSession :: ByteString -> (Maybe PHPSessionVariableList, ByteString)
- decodePartialPHPSessionValue :: ByteString -> (Maybe PHPSessionValue, ByteString)
- type PHPSessionVariableList = [(ByteString, PHPSessionValue)]
- data PHPSessionClassName = PHPSessionClassName ByteString
- data PHPSessionValue
- = PHPSessionValueArray [(PHPSessionValue, PHPSessionValue)]
- | PHPSessionValueBool Bool
- | PHPSessionValueFloat (Either Int Double)
- | PHPSessionValueInt Int
- | PHPSessionValueNull
- | PHPSessionValueObject PHPSessionClassName [(PHPSessionValue, PHPSessionValue)]
- | PHPSessionValueObjectSerializeable PHPSessionClassName ByteString
- | PHPSessionValueString ByteString
- | PHPSessionValueMisc ByteString [PHPSessionAttr]
- data PHPSessionAttr
Decode from ByteString
decodePHPSession :: ByteString -> Maybe PHPSessionVariableListSource
Decodes a ByteString representing a PHP session into a PHPSessionVariableList
decodePHPSessionValue :: ByteString -> Maybe PHPSessionValueSource
Decodes a ByteString into a PHPSessionValue
Encode to ByteString
encodePHPSession :: PHPSessionVariableList -> ByteStringSource
Encode a PHPSessionVariableList into a ByteString.
encodePHPSessionValue :: PHPSessionValue -> ByteStringSource
Encode a PHPSessionValue into a ByteString.
Decode only part of a ByteString
decodePartialPHPSession :: ByteString -> (Maybe PHPSessionVariableList, ByteString)Source
Decodes as much as needed of a ByteString representing a PHP session into a PHPSessionVariableList
decodePartialPHPSessionValue :: ByteString -> (Maybe PHPSessionValue, ByteString)Source
Decodes as much of a ByteString as needed into a PHPSessionValue
PHP session types
type PHPSessionVariableList = [(ByteString, PHPSessionValue)]Source
Holds the top-level session variables and their value contents.
data PHPSessionValue Source
Constructors
Instances
data PHPSessionAttr Source
Instances