--- a/web/lib/Zend/Db/Table/Row/Abstract.php Thu Mar 21 17:31:31 2013 +0100
+++ b/web/lib/Zend/Db/Table/Row/Abstract.php Thu Mar 21 19:50:53 2013 +0100
@@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Abstract.php 22229 2010-05-21 20:55:01Z ralph $
+ * @version $Id: Abstract.php 24831 2012-05-30 12:52:25Z rob $
*/
/**
@@ -29,7 +29,7 @@
* @category Zend
* @package Zend_Db
* @subpackage Table
- * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Db_Table_Row_Abstract implements ArrayAccess, IteratorAggregate
@@ -646,7 +646,7 @@
{
return new ArrayIterator((array) $this->_data);
}
-
+
/**
* Returns the column/value data as an array.
*
@@ -725,6 +725,17 @@
}
/**
+ * Retrieves an associative array of primary keys.
+ *
+ * @param bool $useDirty
+ * @return array
+ */
+ public function getPrimaryKey($useDirty = true)
+ {
+ return $this->_getPrimaryKey($useDirty);
+ }
+
+ /**
* Constructs where statement for retrieving row(s).
*
* @param bool $useDirty
@@ -1167,37 +1178,7 @@
*/
protected function _getTableFromString($tableName)
{
-
- if ($this->_table instanceof Zend_Db_Table_Abstract) {
- $tableDefinition = $this->_table->getDefinition();
-
- if ($tableDefinition !== null && $tableDefinition->hasTableConfig($tableName)) {
- return new Zend_Db_Table($tableName, $tableDefinition);
- }
- }
-
- // assume the tableName is the class name
- if (!class_exists($tableName)) {
- try {
- require_once 'Zend/Loader.php';
- Zend_Loader::loadClass($tableName);
- } catch (Zend_Exception $e) {
- require_once 'Zend/Db/Table/Row/Exception.php';
- throw new Zend_Db_Table_Row_Exception($e->getMessage(), $e->getCode(), $e);
- }
- }
-
- $options = array();
-
- if (($table = $this->_getTable())) {
- $options['db'] = $table->getAdapter();
- }
-
- if (isset($tableDefinition) && $tableDefinition !== null) {
- $options[Zend_Db_Table_Abstract::DEFINITION] = $tableDefinition;
- }
-
- return new $tableName($options);
+ return Zend_Db_Table_Abstract::getTableFromString($tableName, $this->_table);
}
}