public function copy($alter = array()) { $clone = clone $this; foreach ($alter as $prop => $value) { $clone->{$prop} = $value; } return $clone; }