$value) { if (array_key_exists($key, $this)) { $this->$key = $value; } } switch ($this->meta_type) { case 'R': // normalise counters (usually 'id') $this->auto_increment = true; $this->binary = false; $this->has_default = false; $this->default_value = null; $this->unique = true; break; case 'C': $this->auto_increment = false; $this->binary = false; break; } } }