__sleep() public method

public __sleep ( )
Exemplo n.º 1
0
 /**
  *
  */
 public function __sleep()
 {
     $parentVars = parent::__sleep();
     $finalVars = array();
     $lazyLoadedFields = $this->getLazyLoadedFields();
     foreach ($parentVars as $key) {
         if (in_array($key, $lazyLoadedFields)) {
             // prevent lazyloading properties to go into the cache, only to version and recyclebin, ... (_fulldump)
             if (isset($this->_fulldump)) {
                 $finalVars[] = $key;
             }
         } else {
             $finalVars[] = $key;
         }
     }
     return $finalVars;
 }