type = (string) $type; $this->length = (int) $length; $this->notNull = (bool) $notNull; $this->default = $default; $this->autoIncrement = (bool) $autoIncrement; $this->unsigned = (bool) $unsigned; if ( $type == 'integer' && $notNull && $default === null && $autoIncrement == false ) { $this->default = 0; } } static public function __set_state( array $array ) { return new ezcDbSchemaField( $array['type'], $array['length'], $array['notNull'], $array['default'], $array['autoIncrement'], $array['unsigned'] ); } } ?>