|
| walk ($query, array $callbacks, array $args=[], $connection=null) |
|
| __construct (array $data=[]) |
|
| addData (array $arr) |
|
| setData ($key, $value=null) |
|
| unsetData ($key=null) |
|
| getData ($key='', $index=null) |
|
| getDataByPath ($path) |
|
| getDataByKey ($key) |
|
| setDataUsingMethod ($key, $args=[]) |
|
| getDataUsingMethod ($key, $args=null) |
|
| hasData ($key='') |
|
| toArray (array $keys=[]) |
|
| convertToArray (array $keys=[]) |
|
| toXml (array $keys=[], $rootName='item', $addOpenTag=false, $addCdata=true) |
|
| convertToXml (array $arrAttributes=[], $rootName='item', $addOpenTag=false, $addCdata=true) |
|
| toJson (array $keys=[]) |
|
| convertToJson (array $keys=[]) |
|
| toString ($format='') |
|
| __call ($method, $args) |
|
| isEmpty () |
|
| serialize ($keys=[], $valueSeparator='=', $fieldSeparator=' ', $quote='"') |
|
| debug ($data=null, &$objects=[]) |
|
| offsetSet ($offset, $value) |
|
| offsetExists ($offset) |
|
| offsetUnset ($offset) |
|
| offsetGet ($offset) |
|
Definition at line 16 of file Iterator.php.
◆ _getStatement()
Fetch Zend statement instance
- Parameters
-
\Zend_Db_Statement_Interface | \Magento\Framework\DB\Select | string | $query | |
AdapterInterface | $connection | |
- Returns
- \Zend_Db_Statement_Interface
- Exceptions
-
Definition at line 53 of file Iterator.php.
65 throw new LocalizedException(
66 new Phrase(
'The connection is invalid. Verify the connection and try again.')
72 throw new LocalizedException(
new Phrase(
'The query is invalid. Verify the query and try again.'));
◆ walk()
walk |
( |
|
$query, |
|
|
array |
$callbacks, |
|
|
array |
$args = [] , |
|
|
|
$connection = null |
|
) |
| |
Walk over records fetched from query one by one using callback function
- Parameters
-
\Zend_Db_Statement_Interface | \Magento\Framework\DB\Select | string | $query | |
array | string | $callbacks | |
array | $args | |
AdapterInterface | $connection | |
- Returns
- \Magento\Framework\Model\ResourceModel\Iterator
Definition at line 27 of file Iterator.php.
31 while (
$row = $stmt->fetch()) {
33 foreach ($callbacks as $callback) {
36 $args = array_merge($args, (array)
$result);
call_user_func($callable, $param)
_getStatement($query, AdapterInterface $connection=null)
The documentation for this class was generated from the following file: