MockNoResult.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Validate
  17. * @subpackage UnitTests
  18. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id $
  21. */
  22. /**
  23. * @see Zend_Db_Adapter_Abstract
  24. */
  25. require_once 'Zend/Db/Adapter/Abstract.php';
  26. /**
  27. * Mock Db adapter for Zend_Validate_Db tests
  28. *
  29. * @category Zend
  30. * @package Zend_Validate
  31. * @subpackage UnitTests
  32. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  33. * @license http://framework.zend.com/license/new-bsd New BSD License
  34. */
  35. class Db_MockNoResult extends Zend_Db_Adapter_Abstract
  36. {
  37. /**
  38. * Returns a fixed result
  39. *
  40. * @param string|Zend_Db_Select $sql An SQL SELECT statement.
  41. * @param mixed $bind Data to bind into SELECT placeholders.
  42. * @param mixed $fetchMode Override current fetch mode.
  43. * @return null
  44. */
  45. public function fetchRow($sql, $bind = array(), $fetchMode = null)
  46. {
  47. return null;
  48. }
  49. /**
  50. * Override for the constructor
  51. * @param array $config
  52. */
  53. public function __construct($config = null)
  54. {
  55. // Do Nothing.
  56. }
  57. /**
  58. * The below methods are un-needed, but need to be implemented for this to
  59. * be a concrete class
  60. */
  61. public function listTables()
  62. {
  63. return null;
  64. }
  65. public function describeTable($tableName, $schemaName = null)
  66. {
  67. return null;
  68. }
  69. protected function _connect()
  70. {
  71. return null;
  72. }
  73. public function isConnected()
  74. {
  75. return null;
  76. }
  77. public function closeConnection()
  78. {
  79. return null;
  80. }
  81. public function prepare($sql)
  82. {
  83. return null;
  84. }
  85. public function lastInsertId($tableName = null, $primaryKey = null)
  86. {
  87. return null;
  88. }
  89. protected function _beginTransaction()
  90. {
  91. return null;
  92. }
  93. protected function _commit()
  94. {
  95. return null;
  96. }
  97. protected function _rollBack()
  98. {
  99. return null;
  100. }
  101. public function setFetchMode($mode)
  102. {
  103. return null;
  104. }
  105. public function limit($sql, $count, $offset = 0)
  106. {
  107. return null;
  108. }
  109. public function supportsParameters($type)
  110. {
  111. return null;
  112. }
  113. public function getServerVersion()
  114. {
  115. return null;
  116. }
  117. }