Doctrine\DBAL\Connection::getBindingInfo PHP Method

getBindingInfo() private method

Gets the binding type of a given type. The given type can be a PDO or DBAL mapping type.
private getBindingInfo ( mixed $value, mixed $type ) : array
$value mixed The value to bind.
$type mixed The type to bind (PDO or DBAL).
return array [0] => the (escaped) value, [1] => the binding type.
    private function getBindingInfo($value, $type)
    {
        if (is_string($type)) {
            $type = Type::getType($type);
        }
        if ($type instanceof Type) {
            $value = $type->convertToDatabaseValue($value, $this->getDatabasePlatform());
            $bindingType = $type->getBindingType();
        } else {
            $bindingType = $type;
            // PDO::PARAM_* constants
        }
        return array($value, $bindingType);
    }