Statement.php 855 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Doctrine\DBAL\Driver\PDOSqlsrv;
  3. use Doctrine\DBAL\Driver\PDOStatement;
  4. use Doctrine\DBAL\ParameterType;
  5. use PDO;
  6. /**
  7. * PDO SQL Server Statement
  8. */
  9. class Statement extends PDOStatement
  10. {
  11. /**
  12. * {@inheritdoc}
  13. */
  14. public function bindParam($column, &$variable, $type = ParameterType::STRING, $length = null, $driverOptions = null)
  15. {
  16. if (($type === ParameterType::LARGE_OBJECT || $type === ParameterType::BINARY)
  17. && $driverOptions === null
  18. ) {
  19. $driverOptions = PDO::SQLSRV_ENCODING_BINARY;
  20. }
  21. return parent::bindParam($column, $variable, $type, $length, $driverOptions);
  22. }
  23. /**
  24. * {@inheritdoc}
  25. */
  26. public function bindValue($param, $value, $type = ParameterType::STRING)
  27. {
  28. return $this->bindParam($param, $value, $type);
  29. }
  30. }