Esempio n. 1
0
 /**
  *
  */
 public function __sleep()
 {
     $finalVars = array();
     $parentVars = parent::__sleep();
     if (isset($this->_fulldump)) {
         // this is if we want to make a full dump of the object (eg. for a new version), including childs for recyclebin
         $blockedVars = array("o_userPermissions", "o_dependencies", "o_hasChilds", "o_versions", "o_class", "scheduledTasks", "o_parent", "omitMandatoryCheck");
         $finalVars[] = "_fulldump";
         $this->removeInheritedProperties();
     } else {
         // this is if we want to cache the object
         $blockedVars = array("o_userPermissions", "o_dependencies", "o_childs", "o_hasChilds", "o_versions", "o_class", "scheduledTasks", "o_properties", "o_parent", "o___loadedLazyFields", "omitMandatoryCheck");
     }
     foreach ($parentVars as $key) {
         if (!in_array($key, $blockedVars)) {
             $finalVars[] = $key;
         }
     }
     return $finalVars;
 }
Esempio n. 2
0
 /**
  *
  */
 public function __sleep()
 {
     $finalVars = [];
     $parentVars = parent::__sleep();
     if (isset($this->_fulldump)) {
         // this is if we want to make a full dump of the object (eg. for a new version), including childs for recyclebin
         $blockedVars = ["scheduledTasks", "dependencies", "userPermissions", "hasChilds", "versions", "parent", "stream"];
         $finalVars[] = "_fulldump";
         $this->removeInheritedProperties();
     } else {
         // this is if we want to cache the object
         $blockedVars = ["scheduledTasks", "dependencies", "userPermissions", "hasChilds", "versions", "childs", "properties", "stream", "parent"];
     }
     foreach ($parentVars as $key) {
         if (!in_array($key, $blockedVars)) {
             $finalVars[] = $key;
         }
     }
     return $finalVars;
 }