-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | PHP session serialization -- -- PHP session serialization @package hs-php-session @version 0.0.8.8 -- | Encodes and decodes serialized PHP sessions in the format used by the -- "php" setting for serialize_handler. module Data.PHPSession.Types -- | Holds the top-level session variables and their value contents. type PHPSessionVariableList = [(ByteString, PHPSessionValue)] data PHPSessionClassName PHPSessionClassName :: ByteString -> PHPSessionClassName data PHPSessionValue PHPSessionValueArray :: [(PHPSessionValue, PHPSessionValue)] -> PHPSessionValue PHPSessionValueBool :: Bool -> PHPSessionValue PHPSessionValueFloat :: (Either Int Double) -> PHPSessionValue PHPSessionValueInt :: Int -> PHPSessionValue PHPSessionValueNull :: PHPSessionValue PHPSessionValueObject :: PHPSessionClassName -> [(PHPSessionValue, PHPSessionValue)] -> PHPSessionValue PHPSessionValueObjectSerializeable :: PHPSessionClassName -> ByteString -> PHPSessionValue PHPSessionValueString :: ByteString -> PHPSessionValue PHPSessionValueMisc :: ByteString -> [PHPSessionAttr] -> PHPSessionValue data PHPSessionAttr PHPSessionAttrInt :: Int -> PHPSessionAttr PHPSessionAttrFloat :: Double -> PHPSessionAttr PHPSessionAttrNested :: [PHPSessionValue] -> PHPSessionAttr instance Eq PHPSessionAttr instance Show PHPSessionAttr instance Ord PHPSessionValue instance Eq PHPSessionValue instance Show PHPSessionValue instance Eq PHPSessionClassName instance Show PHPSessionClassName -- | Encodes and decodes serialized PHP sessions in the format used by the -- "php" setting for session.serialize_handler. module Data.PHPSession -- | Decodes a ByteString representing a PHP session into a -- PHPSessionVariableList decodePHPSession :: ByteString -> Maybe PHPSessionVariableList -- | Decodes a ByteString into a PHPSessionValue decodePHPSessionValue :: ByteString -> Maybe PHPSessionValue -- | Encode a PHPSessionVariableList into a ByteString. encodePHPSession :: PHPSessionVariableList -> ByteString -- | Encode a PHPSessionValue into a ByteString. encodePHPSessionValue :: PHPSessionValue -> ByteString -- | Decodes as much as needed of a ByteString representing a PHP -- session into a PHPSessionVariableList decodePartialPHPSession :: ByteString -> (Maybe PHPSessionVariableList, ByteString) -- | Decodes as much of a ByteString as needed into a -- PHPSessionValue decodePartialPHPSessionValue :: ByteString -> (Maybe PHPSessionValue, ByteString) -- | Holds the top-level session variables and their value contents. type PHPSessionVariableList = [(ByteString, PHPSessionValue)] data PHPSessionClassName PHPSessionClassName :: ByteString -> PHPSessionClassName data PHPSessionValue PHPSessionValueArray :: [(PHPSessionValue, PHPSessionValue)] -> PHPSessionValue PHPSessionValueBool :: Bool -> PHPSessionValue PHPSessionValueFloat :: (Either Int Double) -> PHPSessionValue PHPSessionValueInt :: Int -> PHPSessionValue PHPSessionValueNull :: PHPSessionValue PHPSessionValueObject :: PHPSessionClassName -> [(PHPSessionValue, PHPSessionValue)] -> PHPSessionValue PHPSessionValueObjectSerializeable :: PHPSessionClassName -> ByteString -> PHPSessionValue PHPSessionValueString :: ByteString -> PHPSessionValue PHPSessionValueMisc :: ByteString -> [PHPSessionAttr] -> PHPSessionValue data PHPSessionAttr PHPSessionAttrInt :: Int -> PHPSessionAttr PHPSessionAttrFloat :: Double -> PHPSessionAttr PHPSessionAttrNested :: [PHPSessionValue] -> PHPSessionAttr