Constructor.
public __construct ( string $name, string $default, string $sqlType = null, boolean $null = true ) | ||
$name | string | The column's name, such as "supplier_id" in "supplier_id int(11)". |
$default | string | The type-casted default value, such as "new" in "sales_stage varchar(20) default 'new'". |
$sqlType | string | Used to extract the column's type, length and signed status, if necessary. For example "varchar" and "60" in "company_name varchar(60)" or "unsigned => true" in "int(10) UNSIGNED". |
$null | boolean | Whether this column allows NULL values. |
/** * Construct * @param string $name * @param string $default * @param string $sqlType * @param boolean $null */ public function __construct($name, $default, $sqlType = null, $null = true) { $this->_originalDefault = $default; parent::__construct($name, $default, $sqlType, $null); if ($this->_isMissingDefaultForgedAsEmptyString()) { $this->_default = null; } }
/** * Construct * @param string $name * @param string $default * @param string $sqlType * @param boolean $null */ public function __construct($name, $default, $sqlType = null, $null = true) { parent::__construct($name, $this->_extractValueFromDefault($default), $sqlType, $null); }