lib/Doctrine/DBAL/Statement.php
public function bindValue($name, $value, $type = ParameterType::STRING)
    {
        $this->params[$name] = $value;
        $this->types[$name]  = $type;
        if ($type !== null) {
            if (is_string($type)) {
                $type = Type::getType($type);
            }
            if ($type instanceof Type) {
                $value       = $type->convertToDatabaseValue($value, $this->platform);
                $bindingType = $type->getBindingType();
            } else {
                $bindingType = $type;
            }

            return $this->stmt->bindValue($name, $value, $bindingType);
        }

        return $this->stmt->bindValue($name, $value);
    }
public function bindValue($name, $value, $type = ParameterType::STRING)
    {
        $this->params[$name] = $value;
        $this->types[$name]  = $type;
        if ($type !== null) {
            if (is_string($type)) {
                $type = Type::getType($type);
            }
            if ($type instanceof Type) {
                $value       = $type->convertToDatabaseValue($value, $this->platform);
                $bindingType = $type->getBindingType();
            } else {
                $bindingType = $type;
            }

            return $this->stmt->bindValue($name, $value, $bindingType);
        }

        return $this->stmt->bindValue($name, $value);
    }
public function bindValue ( $ name , $ value , $ type = ParameterType :: STRING ) { $ this -> params [ $ name ] = $ value ; $ this -> types [ $ name ] = $ type ; if ( $ type !== null ) { if ( is_string ( $ type ) ) { $ type = Type :: getType ( $ type ) ; } if ( $ type instanceof Type ) { $ value = $ type -> convertToDatabaseValue ( $ value , $ this -> platform ) ; $ bindingType = $ type -> getBindingType ( ) ; } else { $ bindingType = $ type ; } return $ this -> stmt -> bindValue ( $ name , $ value , $ bindingType ) ; } return $ this -> stmt -> bindValue ( $ name , $ value ) ; }
Binds a parameter value to the statement.

The value can optionally be bound with a PDO binding type or a DBAL mapping type.
If bound with a DBAL mapping type, the binding type is derived from the mapping
type and the value undergoes the conversion routines of the mapping type before
being bound.

@param string|int $name  The name or position of the parameter.
@param mixed      $value The value of the parameter.
@param mixed      $type  Either a PDO binding type or a DBAL mapping type name or instance.

@return bool TRUE on success, FALSE on failure.
Binds a parameter value to the statement .