PHP Class Prado\Web\UI\TPageStateFormatter

TPageStateFormatter is a utility class to transform the page state into and from a string that can be properly saved in persistent storage. Depending on the {@link TPage::getEnableStateValidation() EnableStateValidation} and {@link TPage::getEnableStateEncryption() EnableStateEncryption}, TPageStateFormatter may do HMAC validation and encryption to prevent the state data from being tampered or viewed. The private keys and hashing/encryption methods are determined by {@link TApplication::getSecurityManager() SecurityManager}.
Since: 3.1
Author: Qiang Xue ([email protected])
Datei anzeigen Open project: pradosoft/prado Class Usage Examples

Public Methods

Method Description
serialize ( $page, $data ) : string
unserialize ( $page, $data ) : mixed

Method Details

serialize() public static method

public static serialize ( $page, $data ) : string
return string serialized data

unserialize() public static method

public static unserialize ( $page, $data ) : mixed
return mixed unserialized state data, null if data is corrupted