$value) { if ( ! in_array($option, $this->valid_options)) { throw new \InvalidArgumentException("{$option} is not a valid {$type}"); } $func = "set_{$option}"; (method_exists($this, "set_{$option}")) ? $this->$func($value) : $this->__set($option, $value); } return $this; } // -------------------------------------------------------------------------- /** * Getters * @param mixed $name * @return mixed */ public function __get($name) { if ( ! isset($this->$name)) return NULL; return $this->$name; } // -------------------------------------------------------------------------- /** * Setters * @param mixed $name * @param mixed $val * @return \Query\Table_Column */ public function __set($name, $val) { $this->$name = $val; return $this; } } // End of abstract_table.php