You are here

public function RulesIdentifiableDataWrapper::__sleep in Rules 7.2

Prepare for serialization.

Overrides EntityStructureWrapper::__sleep

File

includes/rules.state.inc, line 756
Contains the state and data related stuff.

Class

RulesIdentifiableDataWrapper
A wrapper class similar to the EntityDrupalWrapper, but for non-entities.

Code

public function __sleep() {
  $vars = parent::__sleep();

  // Don't serialize the loaded data, except for the case the data is not
  // saved yet.
  if (!empty($this->id)) {
    unset($vars['data']);
  }
  return $vars;
}