setLength($length); parent::__construct($name, $nullable, $default, $options); } /** * @param int $length * @return self Provides a fluent interface */ public function setLength($length) { $this->length = (int) $length; return $this; } /** * @return int */ public function getLength() { return $this->length; } /** * @return string */ protected function getLengthExpression() { return (string) $this->length; } /** * @return array */ public function getExpressionData() { $data = parent::getExpressionData(); if ($this->getLengthExpression()) { $data[0][1][1] .= '(' . $this->getLengthExpression() . ')'; } return $data; } }