ordinal = $ordinal; if($type == DbType::AUTO) $type = DbTools::detectType($value); $this->type = $type; $this->value = $type === DbType::NULL ? null : $value; } /** * Gets the parameter number. * * @return int Parameter number. */ public function getOrdinal(): int { return $this->ordinal; } /** * Gets the DbType of for the parameter. * * @return int DbType. */ public function getDbType(): int { return $this->type; } /** * Gets the type character for the mysqli bind. * * @return string Type character. */ public function getBindType(): string { switch($this->type) { case DbType::INTEGER: return 'i'; case DbType::FLOAT: return 'd'; case DbType::BLOB: return 'b'; default: return 's'; } } /** * Gets the value for the parameter. * * @return mixed Value. */ public function getValue(): mixed { return $this->value; } }