23
23
* Interface for Doctrine adapter statements.
24
24
*
25
25
* @author Konsta Vesterinen <[email protected] >
26
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
27
26
*
28
27
* @see www.doctrine-project.org
29
- * @since 1.0
30
- *
31
- * @version $Revision: 7490 $
32
28
*/
33
29
interface Doctrine_Adapter_Statement_Interface
34
30
{
35
31
/**
36
32
* Bind a column to a PHP variable.
37
33
*
38
- * @param mixed $column Number of the column (1-indexed) or name of the column in the result set.
39
- * If using the column name, be aware that the name should match
40
- * the case of the column, as returned by the driver.
41
- * @param string $param name of the PHP variable to which the column will be bound
42
- * @param int $type data type of the parameter, specified by the Doctrine_Core::PARAM_* constants
43
- *
44
- * @return bool Returns TRUE on success or FALSE on failure
34
+ * @param mixed $column Number of the column (1-indexed) or name of the column in the result set.
35
+ * If using the column name, be aware that the name should match
36
+ * the case of the column, as returned by the driver.
37
+ * @param string $param name of the PHP variable to which the column will be bound
38
+ * @param int $type data type of the parameter, specified by the Doctrine_Core::PARAM_* constants
39
+ * @return bool Returns TRUE on success or FALSE on failure
45
40
*/
46
41
public function bindColumn ($ column , $ param , $ type = null );
47
42
48
43
/**
49
44
* Binds a value to a corresponding named or question mark
50
45
* placeholder in the SQL statement that was use to prepare the statement.
51
46
*
52
- * @param mixed $param Parameter identifier. For a prepared statement using named placeholders,
53
- * this will be a parameter name of the form :name. For a prepared statement
54
- * using question mark placeholders, this will be the 1-indexed position of the parameter
55
- * @param mixed $value the value to bind to the parameter
56
- * @param int $type explicit data type for the parameter using the Doctrine_Core::PARAM_* constants
57
- *
58
- * @return bool returns TRUE on success or FALSE on failure
47
+ * @param mixed $param Parameter identifier. For a prepared statement using named placeholders,
48
+ * this will be a parameter name of the form :name. For a prepared statement
49
+ * using question mark placeholders, this will be the 1-indexed position of the parameter
50
+ * @param mixed $value the value to bind to the parameter
51
+ * @param int $type explicit data type for the parameter using the Doctrine_Core::PARAM_* constants
52
+ * @return bool returns TRUE on success or FALSE on failure
59
53
*/
60
54
public function bindValue ($ param , $ value , $ type = null );
61
55
@@ -70,14 +64,13 @@ public function bindValue($param, $value, $type = null);
70
64
* of stored procedures that return data as output parameters, and some also as input/output
71
65
* parameters that both send in data and are updated to receive it.
72
66
*
73
- * @param mixed $variable name of the PHP variable to bind to the SQL statement parameter
74
- * @param int $type Explicit data type for the parameter using the Doctrine_Core::PARAM_* constants. To return
75
- * an INOUT parameter from a stored procedure, use the bitwise OR operator to set the
76
- * Doctrine_Core::PARAM_INPUT_OUTPUT bits for the data_type parameter.
77
- * @param int $length Length of the data type. To indicate that a parameter is an OUT parameter
78
- * from a stored procedure, you must explicitly set the length.
79
- *
80
- * @return bool returns TRUE on success or FALSE on failure
67
+ * @param mixed $variable name of the PHP variable to bind to the SQL statement parameter
68
+ * @param int $type Explicit data type for the parameter using the Doctrine_Core::PARAM_* constants. To return
69
+ * an INOUT parameter from a stored procedure, use the bitwise OR operator to set the
70
+ * Doctrine_Core::PARAM_INPUT_OUTPUT bits for the data_type parameter.
71
+ * @param int $length Length of the data type. To indicate that a parameter is an OUT parameter
72
+ * from a stored procedure, you must explicitly set the length.
73
+ * @return bool returns TRUE on success or FALSE on failure
81
74
*/
82
75
public function bindParam ($ column , &$ variable , $ type = null , $ length = null , $ driverOptions = array ());
83
76
@@ -124,10 +117,9 @@ public function errorInfo();
124
117
* if any, of their associated parameter markers or pass an array of input-only
125
118
* parameter values
126
119
*
127
- * @param array $params an array of values with as many elements as there are
128
- * bound parameters in the SQL statement being executed
129
- *
130
- * @return bool returns TRUE on success or FALSE on failure
120
+ * @param array $params an array of values with as many elements as there are
121
+ * bound parameters in the SQL statement being executed
122
+ * @return bool returns TRUE on success or FALSE on failure
131
123
*/
132
124
public function execute ($ params = null );
133
125
@@ -164,10 +156,9 @@ public function fetch(
164
156
/**
165
157
* Returns an array containing all of the result set rows.
166
158
*
167
- * @param int $fetchStyle Controls how the next row will be returned to the caller.
168
- * This value must be one of the Doctrine_Core::FETCH_* constants,
169
- * defaulting to Doctrine_Core::FETCH_BOTH
170
- *
159
+ * @param int $fetchStyle Controls how the next row will be returned to the caller.
160
+ * This value must be one of the Doctrine_Core::FETCH_* constants,
161
+ * defaulting to Doctrine_Core::FETCH_BOTH
171
162
* @return array
172
163
*/
173
164
public function fetchAll ($ fetchStyle = Doctrine_Core::FETCH_BOTH );
@@ -176,10 +167,9 @@ public function fetchAll($fetchStyle = Doctrine_Core::FETCH_BOTH);
176
167
* Returns a single column from the next row of a
177
168
* result set or FALSE if there are no more rows.
178
169
*
179
- * @param int $columnIndex 0-indexed number of the column you wish to retrieve from the row. If no
180
- * value is supplied, Doctrine_Adapter_Statement_Interface->fetchColumn()
181
- * fetches the first column.
182
- *
170
+ * @param int $columnIndex 0-indexed number of the column you wish to retrieve from the row. If no
171
+ * value is supplied, Doctrine_Adapter_Statement_Interface->fetchColumn()
172
+ * fetches the first column.
183
173
* @return string returns a single column in the next row of a result set
184
174
*/
185
175
public function fetchColumn ($ columnIndex = 0 );
@@ -190,11 +180,10 @@ public function fetchColumn($columnIndex = 0);
190
180
* Fetches the next row and returns it as an object. This function is an alternative to
191
181
* Doctrine_Adapter_Statement_Interface->fetch() with Doctrine_Core::FETCH_CLASS or Doctrine_Core::FETCH_OBJ style.
192
182
*
193
- * @param string $className name of the created class, defaults to stdClass
194
- * @param array $args elements of this array are passed to the constructor
195
- *
196
- * @return mixed an instance of the required class with property names that correspond
197
- * to the column names or FALSE in case of an error
183
+ * @param string $className name of the created class, defaults to stdClass
184
+ * @param array $args elements of this array are passed to the constructor
185
+ * @return mixed an instance of the required class with property names that correspond
186
+ * to the column names or FALSE in case of an error
198
187
*/
199
188
public function fetchObject ($ className = 'stdClass ' , $ args = array ());
200
189
@@ -212,8 +201,7 @@ public function getAttribute($attribute);
212
201
/**
213
202
* Returns metadata for a column in a result set.
214
203
*
215
- * @param int $column the 0-indexed column in the result set
216
- *
204
+ * @param int $column the 0-indexed column in the result set
217
205
* @return array Associative meta data array with the following structure:
218
206
*
219
207
* native_type The PHP native type used to represent the column value.
@@ -254,21 +242,19 @@ public function rowCount();
254
242
/**
255
243
* Set a statement attribute.
256
244
*
257
- * @param int $attribute
258
- * @param mixed $value the value of given attribute
259
- *
260
- * @return bool returns TRUE on success or FALSE on failure
245
+ * @param int $attribute
246
+ * @param mixed $value the value of given attribute
247
+ * @return bool returns TRUE on success or FALSE on failure
261
248
*/
262
249
public function setAttribute ($ attribute , $ value );
263
250
264
251
/**
265
252
* Set the default fetch mode for this statement.
266
253
*
267
- * @param int $mode the fetch mode must be one of the Doctrine_Core::FETCH_* constants
268
- * @param mixed|null $arg1
269
- * @param mixed|null $arg2
270
- *
271
- * @return bool returns 1 on success or FALSE on failure
254
+ * @param int $mode the fetch mode must be one of the Doctrine_Core::FETCH_* constants
255
+ * @param mixed|null $arg1
256
+ * @param mixed|null $arg2
257
+ * @return bool returns 1 on success or FALSE on failure
272
258
*/
273
259
public function setFetchMode ($ mode , $ arg1 = null , $ arg2 = null );
274
260
}
0 commit comments