Skip to content

Instantly share code, notes, and snippets.

@miholeus
Created December 18, 2010 00:16
Show Gist options
  • Save miholeus/745954 to your computer and use it in GitHub Desktop.
Save miholeus/745954 to your computer and use it in GitHub Desktop.
another version of setting prefix
class Mist_Db_Table extends Zend_Db_Table
{
public function __construct($config = array(), $definition = null)
{
parent::__construct($config, $definition);
$config = $this->getAdapter()->getConfig();
if(array_key_exists('prefix', $config))
{
$this->_name = $config['prefix'] . $this->_name;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment