import v1.1.0_beta1 | 2009-08-21
This commit is contained in:
@ -20,11 +20,6 @@
|
||||
* @version $Id: Abstract.php 5896 2007-07-27 20:04:24Z bkarwin $
|
||||
*/
|
||||
|
||||
/**
|
||||
* @see Zend_Loader
|
||||
*/
|
||||
require_once 'Zend/Loader.php';
|
||||
|
||||
/**
|
||||
* @category Zend
|
||||
* @package Zend_Db
|
||||
@ -116,7 +111,10 @@ abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Counta
|
||||
if (isset($config['rowClass'])) {
|
||||
$this->_rowClass = $config['rowClass'];
|
||||
}
|
||||
@Zend_Loader::loadClass($this->_rowClass);
|
||||
if (!class_exists($this->_rowClass)) {
|
||||
require_once 'Zend/Loader.php';
|
||||
Zend_Loader::loadClass($this->_rowClass);
|
||||
}
|
||||
if (isset($config['data'])) {
|
||||
$this->_data = $config['data'];
|
||||
}
|
||||
@ -129,7 +127,7 @@ abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Counta
|
||||
|
||||
// set the count of rows
|
||||
$this->_count = count($this->_data);
|
||||
|
||||
|
||||
$this->init();
|
||||
}
|
||||
|
||||
@ -310,7 +308,7 @@ abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Counta
|
||||
{
|
||||
return $this->_count;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Take the Iterator to position $position
|
||||
* Required by interface SeekableIterator.
|
||||
@ -322,14 +320,14 @@ abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Counta
|
||||
public function seek($position)
|
||||
{
|
||||
$position = (int) $position;
|
||||
if ($position < 0 || $position > $this->_count) {
|
||||
if ($position < 0 || $position >= $this->_count) {
|
||||
require_once 'Zend/Db/Table/Rowset/Exception.php';
|
||||
throw new Zend_Db_Table_Rowset_Exception("Illegal index $position");
|
||||
}
|
||||
$this->_pointer = $position;
|
||||
return $this;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if an offset exists
|
||||
* Required by the ArrayAccess implementation
|
||||
@ -341,7 +339,7 @@ abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Counta
|
||||
{
|
||||
return isset($this->_data[(int) $offset]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the row for the given offset
|
||||
* Required by the ArrayAccess implementation
|
||||
@ -355,7 +353,7 @@ abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Counta
|
||||
|
||||
return $this->current();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Does nothing
|
||||
* Required by the ArrayAccess implementation
|
||||
@ -366,7 +364,7 @@ abstract class Zend_Db_Table_Rowset_Abstract implements SeekableIterator, Counta
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Does nothing
|
||||
* Required by the ArrayAccess implementation
|
||||
|
Reference in New Issue
Block a user