_setupTableName() protected method

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
return void
示例#1
0
 /**
  * Set name of table
  *
  */
 protected function _setupTableName()
 {
     if ($this->getRowClass()) {
         $this->_name = $this->getRowClass();
     }
     parent::_setupTableName();
 }
示例#2
0
 /**
  * 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;
     }
 }
示例#3
0
 protected function _setupTableName()
 {
     if (defined('T_PREFIX')) {
         $this->_name = T_PREFIX . $this->_name;
     }
     parent::_setupTableName();
 }
示例#4
0
文件: Table.php 项目: html/PI
 protected function _setupTableName()
 {
     if (is_null($this->_name)) {
         $this->_name = strtolower(str_replace('Model', '', get_class($this)));
     }
     parent::_setupTableName();
 }
示例#5
0
 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;
 }
示例#7
0
文件: Table.php 项目: rcrrich/cunity
 /**
  * @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();
 }
示例#8
0
 /**
  * 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;
 }
示例#9
0
 /**
  * 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();
 }