__sleep() public method

Returns only the properties which should be serialized
public __sleep ( ) : void
return void
Beispiel #1
0
 /**
  * @return array
  */
 public function __sleep()
 {
     $finalVars = array();
     $parentVars = parent::__sleep();
     $blockedVars = array("o");
     foreach ($parentVars as $key) {
         if (!in_array($key, $blockedVars)) {
             $finalVars[] = $key;
         }
     }
     return $finalVars;
 }