$property))) { $this->$property = !$this->$property; return $this; } // append item to array if (is_array($this->$property)) { if (is_array($args[0])) { $this->$property = $args[0]; } else { array_push($this->$property, $args[0]); } return $this; } $this->$property = $args[0]; return $this; } }