function RulesIdentifiableDataWrapper::__sleep

Prepare for serialization.

File

includes/rules.state.inc, line 768

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;
}