function __construct($name, $type, $keys, $attributes) { foreach (explode(',', $keys) as $k) { $this->keys[] = trim($k, ' `'); } parent::__construct($name, $type, $attributes); }
function __construct($name, $field, $type, $attributes) { //REFERENCES `grower` (`grower_id`) $this->field = $field; if (preg_match(static::REFERENCE_REGEX, $attributes, $m)) { $this->reference = new ColumnReference($m[1], $m[2]); $attributes = ltrim(preg_replace(static::REFERENCE_REGEX, '', $attributes)); } parent::__construct($name, $type, $attributes); }