import v1.1.0_RC2 | 2009-09-20

This commit is contained in:
2019-07-17 22:19:00 +02:00
parent 3b7ba80568
commit 38c146901c
2504 changed files with 101817 additions and 62316 deletions

View File

@ -15,8 +15,9 @@
* @category Zend
* @package Zend_Db
* @subpackage Table
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Table.php 16733 2009-07-15 13:16:50Z ralph $
*/
/**
@ -24,16 +25,60 @@
*/
require_once 'Zend/Db/Table/Abstract.php';
/**
* @see Zend_Db_Table_Definition
*/
require_once 'Zend/Db/Table/Definition.php';
/**
* Class for SQL table interface.
*
* @category Zend
* @package Zend_Db
* @subpackage Table
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @deprecated since 0.9
*/
abstract class Zend_Db_Table extends Zend_Db_Table_Abstract
class Zend_Db_Table extends Zend_Db_Table_Abstract
{
/**
* __construct() - For concrete implementation of Zend_Db_Table
*
* @param string|array $config string can reference a Zend_Registry key for a db adapter
* OR it can refernece the name of a table
* @param unknown_type $definition
*/
public function __construct($config = array(), $definition = null)
{
if ($definition !== null && is_array($definition)) {
$definition = new Zend_Db_Table_Definition($definition);
}
if (is_string($config)) {
if (Zend_Registry::isRegistered($config)) {
trigger_error(__CLASS__ . '::' . __METHOD__ . '(\'registryName\') is not valid usage of Zend_Db_Table, '
. 'try extending Zend_Db_Table_Abstract in your extending classes.',
E_USER_NOTICE
);
$config = array(self::ADAPTER => $config);
} else {
// process this as table with or without a definition
if ($definition instanceof Zend_Db_Table_Definition
&& $definition->hasTableConfig($config)) {
// this will have DEFINITION_CONFIG_NAME & DEFINITION
$config = $definition->getTableConfig($config);
} else {
$config = array(self::NAME => $config);
}
}
}
parent::__construct($config);
}
}