[TASK] Streamline phpdoc annotations in EXT:extbase
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Persistence / Generic / Qom / Statement.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Persistence\Generic\Qom;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 /**
18 * A statement acting as a constraint.
19 * @internal only to be used within Extbase, not part of TYPO3 Core API.
20 */
21 class Statement implements ConstraintInterface
22 {
23 /**
24 * @var string|\Doctrine\DBAL\Statement|\TYPO3\CMS\Core\Database\Query\QueryBuilder
25 */
26 protected $statement;
27
28 /**
29 * @var array
30 */
31 protected $boundVariables = [];
32
33 /**
34 * Constructs the Statement instance
35 *
36 * @param string|\Doctrine\DBAL\Statement|\TYPO3\CMS\Core\Database\Query\QueryBuilder $statement The statement as sql string or an instance of \Doctrine\DBAL\Statement or \TYPO3\CMS\Core\Database\Query\QueryBuilder
37 * @param array $boundVariables An array of variables to bind to the statement, only to be used with prepared statements
38 */
39 public function __construct($statement, array $boundVariables = [])
40 {
41 $this->statement = $statement;
42 $this->boundVariables = $boundVariables;
43 }
44
45 /**
46 * Gets the statement.
47 *
48 * @return string|\Doctrine\DBAL\Statement|\TYPO3\CMS\Core\Database\Query\QueryBuilder the statement; non-null
49 */
50 public function getStatement()
51 {
52 return $this->statement;
53 }
54
55 /**
56 * Gets the bound variables
57 *
58 * @return array $boundVariables
59 */
60 public function getBoundVariables()
61 {
62 return $this->boundVariables;
63 }
64
65 /**
66 * Fills an array with the names of all bound variables in the constraints
67 *
68 * @param array &$boundVariables
69 */
70 public function collectBoundVariableNames(&$boundVariables)
71 {
72 }
73 }