If the table name is not set in the class definition,
use the class name itself as the table name.
A schema name provided with the table name (e.g., "schema.table") overrides
any existing value for $this->_schema.
protected _setupTableName ( ) : void | ||
Результат | void |
/** * Set name of table * */ protected function _setupTableName() { if ($this->getRowClass()) { $this->_name = $this->getRowClass(); } parent::_setupTableName(); }
/** * This will automatically set table name with prefix from bootstrap file * @return void */ protected function _setupTableName() { parent::_setupTableName(); if (Zend_Registry::isRegistered('tbl_prefix')) { $this->_name = Zend_Registry::get('tbl_prefix') . $this->_name; } }
protected function _setupTableName() { if (defined('T_PREFIX')) { $this->_name = T_PREFIX . $this->_name; } parent::_setupTableName(); }
protected function _setupTableName() { if (is_null($this->_name)) { $this->_name = strtolower(str_replace('Model', '', get_class($this))); } parent::_setupTableName(); }
protected function _setupTableName() { if (empty($this->_name)) { $className = get_class($this); if (strncmp(self::PREFIX, $className, self::PREFIX_LEN) == 0) { $this->_name = strtolower(substr($className, self::PREFIX_LEN)); } else { $this->_name = strtolower($className); } } parent::_setupTableName(); }
/** * * @return void */ protected function _setupTableName() { parent::_setupTableName(); $this->_name = Fox::getTablePrefix() . $this->_name; }
/** * @throws \Exception */ protected function _setupTableName() { $this->_config = Cunity::get("config"); if ($this->_config->db->params->table_prefix !== '') { $this->_dbprefix = $this->_config->db->params->table_prefix . '_'; } $this->_name = $this->_dbprefix . $this->_name; parent::_setupTableName(); }
/** * Initialize table and schema names. * * If the table name is not set in the class definition, * use the class name itself as the table name. * * A schema name provided with the table name (e.g., "schema.table") overrides * any existing value for $this->_schema. * * @return void */ protected function _setupTableName() { parent::_setupTableName(); $this->_prefix = Axis::config()->db->prefix; $this->_name = $this->_prefix . $this->_name; }
/** * Translate our class name to a table name and setup it. * See Naming Conventions for more information. * * @return void */ protected function _setupTableName() { $this->_name = $this->getTableName(); parent::_setupTableName(); }