State::__unserialize()

Converts the serialized data back to its object.

Table of Contents
  1. Description
  2. Example

Description

State::__unserialize(array $lot): void;

This method will be called when the serialized data is successfully returned into an State instance using the built-in PHP unserialize() function.

Example

$state = unserialize('O:5:"State":1:{s:5:"state";a:1:{s:4:"test";i:1;}}');

echo $state->test; // Returns `1`

State::__unserialize()

Converts the serialized data back to its object.