SelectQuery.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  5. * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  6. *
  7. * Licensed under The MIT License
  8. * For full copyright and license information, please see the LICENSE.txt
  9. * Redistributions of files must retain the above copyright notice.
  10. *
  11. * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  12. * @link https://cakephp.org CakePHP(tm) Project
  13. * @since 4.5.0
  14. * @license https://opensource.org/licenses/mit-license.php MIT License
  15. */
  16. namespace Cake\Database\Query;
  17. use Cake\Database\Query;
  18. /**
  19. * Select Query forward compatibility shim.
  20. */
  21. class SelectQuery extends Query
  22. {
  23. /**
  24. * Type of this query (select, insert, update, delete).
  25. *
  26. * @var string
  27. */
  28. protected $_type = 'select';
  29. /**
  30. * @inheritDoc
  31. */
  32. public function delete(?string $table = null)
  33. {
  34. $this->_deprecatedMethod('delete()', 'Create your query with deleteQuery() instead.');
  35. return parent::delete($table);
  36. }
  37. /**
  38. * @inheritDoc
  39. */
  40. public function insert(array $columns, array $types = [])
  41. {
  42. $this->_deprecatedMethod('insert()', 'Create your query with insertQuery() instead.');
  43. return parent::insert($columns, $types);
  44. }
  45. /**
  46. * @inheritDoc
  47. */
  48. public function into(string $table)
  49. {
  50. $this->_deprecatedMethod('into()', 'Use from() instead.');
  51. return parent::into($table);
  52. }
  53. /**
  54. * @inheritDoc
  55. */
  56. public function values($data)
  57. {
  58. $this->_deprecatedMethod('values()');
  59. return parent::values($data);
  60. }
  61. /**
  62. * @inheritDoc
  63. */
  64. public function update($table = null)
  65. {
  66. $this->_deprecatedMethod('update()', 'Create your query with updateQuery() instead.');
  67. return parent::update($table);
  68. }
  69. /**
  70. * @inheritDoc
  71. */
  72. public function set($key, $value = null, $types = [])
  73. {
  74. $this->_deprecatedMethod('set()');
  75. return parent::set($key, $value, $types);
  76. }
  77. }