Example #1
0
 /**
  * Recursively remove all properties that don't belong in the minimal representation of this object
  * @return $this
  */
 public function minimize()
 {
     $this->removeUnprotectedControls();
     $this->removeUnprotectedProperties();
     parent::minimize();
     return $this;
 }
Example #2
0
 /**
  * Remove all properties that are intended to be human-readable only
  * @return $this
  */
 public function minimize()
 {
     parent::minimize();
     if (isset($this->{'@meta'}) && !get_object_vars($this->{'@meta'})) {
         unset($this->{'@meta'});
     }
     return $this;
 }