equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Db |
16 * @package Zend_Db |
17 * @subpackage Table |
17 * @subpackage Table |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
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 |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: Abstract.php 24593 2012-01-05 20:35:02Z matthew $ |
20 * @version $Id$ |
21 */ |
21 */ |
22 |
22 |
23 /** |
23 /** |
24 * @category Zend |
24 * @category Zend |
25 * @package Zend_Db |
25 * @package Zend_Db |
26 * @subpackage Table |
26 * @subpackage Table |
27 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
27 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
28 * @license http://framework.zend.com/license/new-bsd New BSD License |
28 * @license http://framework.zend.com/license/new-bsd New BSD License |
29 */ |
29 */ |
30 abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Countable, ArrayAccess |
30 abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Countable, ArrayAccess |
31 { |
31 { |
32 /** |
32 /** |
203 $connected = $row->setTable($table); |
203 $connected = $row->setTable($table); |
204 if ($connected == true) { |
204 if ($connected == true) { |
205 $this->_connected = true; |
205 $this->_connected = true; |
206 } |
206 } |
207 } |
207 } |
|
208 $this->rewind(); |
208 return $this->_connected; |
209 return $this->_connected; |
209 } |
210 } |
210 |
211 |
211 /** |
212 /** |
212 * Query the class name of the Table object for which this |
213 * Query the class name of the Table object for which this |
424 'data' => $this->_data[$position], |
425 'data' => $this->_data[$position], |
425 'stored' => $this->_stored, |
426 'stored' => $this->_stored, |
426 'readOnly' => $this->_readOnly |
427 'readOnly' => $this->_readOnly |
427 ) |
428 ) |
428 ); |
429 ); |
|
430 |
|
431 if ( $this->_table instanceof Zend_Db_Table_Abstract ) { |
|
432 $info = $this->_table->info(); |
|
433 |
|
434 if ( $this->_rows[$position] instanceof Zend_Db_Table_Row_Abstract ) { |
|
435 if ($info['cols'] == array_keys($this->_data[$position])) { |
|
436 $this->_rows[$position]->setTable($this->getTable()); |
|
437 } |
|
438 } |
|
439 } else { |
|
440 $this->_rows[$position]->setTable(null); |
|
441 } |
429 } |
442 } |
430 |
443 |
431 // return the row object |
444 // return the row object |
432 return $this->_rows[$position]; |
445 return $this->_rows[$position]; |
433 } |
446 } |