Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. class ContentEntityBase {
  2.  
  3.   public function __sleep() {
  4.     $deep_serialization = $this->deepSerialization;
  5.     if ($this->isBeingSerialized) {
  6.       $deep_serialization = FALSE;
  7.     }
  8.  
  9.     $this->isBeingSerialized = TRUE;
  10.     foreach (... as $field) {
  11.       ... = $field->getSerializationValue($deep_serialization);
  12.     }
  13.     $this->isBeingSerialized = FALSE;
  14.   }
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement