public function bindValue(int $paramNum, $value, $type = null): self
    {
        if (!is_int($paramNum) || $paramNum < 1) {
            throw new exceptions\InvalidArgumentException(sprintf(
                '%s: parameter number should be an integer >= 1, %s given',
                __METHOD__,
                is_int($paramNum) ? $paramNum : gettype($paramNum)
            ));
        }
        $this->values[$paramNum - 1] = $value;
        if (null !== $type) {
            $this->converters[$paramNum - 1] = $this->connection->getTypeConverter($type);
        }

        return $this;
    }
public function bindValue(int $paramNum, $value, $type = null): self
    {
        if (!is_int($paramNum) || $paramNum < 1) {
            throw new exceptions\InvalidArgumentException(sprintf(
                '%s: parameter number should be an integer >= 1, %s given',
                __METHOD__,
                is_int($paramNum) ? $paramNum : gettype($paramNum)
            ));
        }
        $this->values[$paramNum - 1] = $value;
        if (null !== $type) {
            $this->converters[$paramNum - 1] = $this->connection->getTypeConverter($type);
        }

        return $this;
    }
public function bindValue ( int $ paramNum , $ value , $ type = null ) : self { if ( ! is_int ( $ paramNum ) || $ paramNum < 1 ) { throw new exceptions \ InvalidArgumentException ( sprintf ( '%s: parameter number should be an integer >= 1, %s given' , __METHOD__ , is_int ( $ paramNum ) ? $ paramNum : gettype ( $ paramNum ) ) ) ; } $ this -> values [ $ paramNum - 1 ] = $ value ; if ( null !== $ type ) { $ this -> converters [ $ paramNum - 1 ] = $ this -> connection -> getTypeConverter ( $ type ) ; } return $ this ; }
Sets the value for a parameter of a prepared query

@param int   $paramNum Parameter number, 1-based
@param mixed $value    Parameter value
@param mixed $type     Type name / converter object to use for converting to DB type
@return $this

@throws exceptions\InvalidArgumentException
Sets the value for a parameter of a prepared query